spec/companies_spec.rb in firmapi-0.1.2 vs spec/companies_spec.rb in firmapi-0.1.3
- old
+ new
@@ -10,25 +10,25 @@
end
end
subject(:companies) { @companies }
- it { expect(subject.results).to eq 103307 }
- it { expect(subject.size).to eq 100 }
- it { expect(subject.page).to eq 1 }
- it { expect(subject.number_of_pages).to eq 1033 }
+ it { expect(companies.results).to eq 103307 }
+ it { expect(companies.size).to eq 100 }
+ it { expect(companies.page).to eq 1 }
+ it { expect(companies.number_of_pages).to eq 1033 }
context 'list' do
subject(:company) { @companies.to_a.first }
it { is_expected.to be_a Firmapi::Company }
- it { expect(subject.name).to eq("C.M.") }
- it { expect(subject.siren).to eq("527810279") }
- it { expect(subject.nic).to be_nil }
- it { expect(subject.commercial_name).to be_nil }
+ it { expect(company.name).to eq("C.M.") }
+ it { expect(company.siren).to eq("527810279") }
+ it { expect(company.nic).to be_nil }
+ it { expect(company.commercial_name).to be_nil }
end
context ':next_page' do
@@ -38,10 +38,10 @@
end
end
subject(:companies) { @companies }
- it { expect(subject.page).to eq 2 }
+ it { expect(companies.page).to eq 2 }
end
end
\ No newline at end of file