summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-02-27 18:42:09 -0700
committermo khan <mo@mokhan.ca>2014-02-27 18:42:09 -0700
commit24e1bf2c931fe0dc6c8fc267c4e43ba2a8fae6bb (patch)
tree6d5f0698f1193deef4537fda8de81785ef61bf3d
parent4f63c69d6b8d7fe348ccdb7e3e951bfa1e8271ac (diff)
remove unnecessary stub.
-rw-r--r--spec/controllers/v1/company_licenses_controller_spec.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/spec/controllers/v1/company_licenses_controller_spec.rb b/spec/controllers/v1/company_licenses_controller_spec.rb
index 0ba61eb..636537c 100644
--- a/spec/controllers/v1/company_licenses_controller_spec.rb
+++ b/spec/controllers/v1/company_licenses_controller_spec.rb
@@ -7,19 +7,16 @@ describe V1::CompanyLicensesController do
let(:active_licenses) { ["active"] }
let(:active_licenses_in_township) { ["active township"] }
- before :each do
- Company.stub(:find).with(company_id).and_return(company)
- active_licenses.stub(:township).with("123").and_return(active_licenses_in_township)
- end
+ before { Company.stub(:find).with(company_id).and_return(company) }
it "returns the active licenses" do
- company.stub(:filter_licenses_using).with({status: LicenseStatus::ACTIVE, township: nil}).and_return(active_licenses)
+ company.stub(:filter_licenses_using).with(status: LicenseStatus::ACTIVE, township: nil).and_return(active_licenses)
get :index, company_id: company_id
assigns(:licenses).should == active_licenses
end
it "returns the active licenses for a given township" do
- company.stub(:filter_licenses_using).with({status: LicenseStatus::ACTIVE, township: "123"}).and_return(active_licenses_in_township)
+ company.stub(:filter_licenses_using).with(status: LicenseStatus::ACTIVE, township: "123").and_return(active_licenses_in_township)
get :index, company_id: company_id, township: "123"
assigns(:licenses).should == active_licenses_in_township
end