summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-02-22 00:20:40 -0700
committermo khan <mo@mokhan.ca>2014-02-22 00:20:40 -0700
commit3db1f24191ff0a5c1638b5f89e1f0ed595185cd8 (patch)
tree0c802b234af726e5eb009c5f236c64d77520a268
parentccf2255a1c3bb597c1a2c0048cfc7670a0741fc0 (diff)
extract let declarations.
-rw-r--r--spec/models/user_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index 4db73fd..71d9e18 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -3,12 +3,12 @@ require "spec_helper"
describe User do
describe "#apply_for_license" do
context "when applying for a license" do
+ let(:company) { Company.create(name: 'ABC Resources Ltd.') }
+ let(:user) { User.create(company: company) }
+ let(:location) { Location.new(latitude: 51.06, longitude: -114.09, township: '1') }
+
it "creates a new license" do
- company = Company.create(name: 'ABC Resources Ltd.')
- user = User.create(company: company)
- location = Location.new(latitude: 51.06, longitude: -114.09, township: '1')
license = user.apply_for_license(WellType::NFW, location)
-
license.company.should == user.company
license.well_type.should == WellType::NFW
license.location.should == location