Having 2 arrays in index
method, I want to test the equality of the arrays' lengths but it's not working (the lengths of the arrays are equal after testing manually)
def index
@countries = get_countries()
@capitals = get_capitals()
end
Rspec file:
describe CountriesController do
describe 'index' do
it 'countries.length == capitals.length' do
expect(assigns(countries.length)).to eq (assigns(capitals.length))
end
end
end
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…