Skip to content

Instantly share code, notes, and snippets.

@myronmarston
Created July 25, 2012 14:15
Show Gist options
  • Save myronmarston/3176409 to your computer and use it in GitHub Desktop.
Save myronmarston/3176409 to your computer and use it in GitHub Desktop.
describe "Using an underscore in a let" do
def Factory(type)
:sunny
end
let(:today_weather) { Factory(:fore_cast) }
it 'works' do
today_weather.should be(:sunny)
end
end
# A sample Gemfile
source "https://rubygems.org"
gem "rspec", '2.9.0'
GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.1.3)
rspec (2.9.0)
rspec-core (~> 2.9.0)
rspec-expectations (~> 2.9.0)
rspec-mocks (~> 2.9.0)
rspec-core (2.9.0)
rspec-expectations (2.9.1)
diff-lcs (~> 1.1.3)
rspec-mocks (2.9.0)
PLATFORMS
ruby
DEPENDENCIES
rspec (= 2.9.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment