diff options
| author | mo khan <mo@mokhan.ca> | 2014-02-22 00:20:40 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-02-22 00:20:40 -0700 |
| commit | 3db1f24191ff0a5c1638b5f89e1f0ed595185cd8 (patch) | |
| tree | 0c802b234af726e5eb009c5f236c64d77520a268 /spec | |
| parent | ccf2255a1c3bb597c1a2c0048cfc7670a0741fc0 (diff) | |
extract let declarations.
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/models/user_spec.rb | 8 |
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 |
