From aa971b23e729165cc62406c3f850cfac7ef51609 Mon Sep 17 00:00:00 2001 From: Melissa Xie Date: Tue, 19 Mar 2013 16:56:50 -0400 Subject: [PATCH] Add rspec gem to Cucumber definitions --- features/rails_integration.feature | 4 ++-- features/step_definitions/rails_steps.rb | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/features/rails_integration.feature b/features/rails_integration.feature index 0c90c7f6..77405c77 100644 --- a/features/rails_integration.feature +++ b/features/rails_integration.feature @@ -62,7 +62,7 @@ Feature: integrate with Rails And the output should contain "ExamplesController should assign @example" Scenario: generate a rails application and use matchers in Rspec - When I configure the application to use rspec-rails + When I configure the application to use rspec and rspec-rails And I configure the application to use "shoulda-matchers" from this project And I run the rspec generator And I write to "spec/models/user_spec.rb" with: @@ -88,7 +88,7 @@ Feature: integrate with Rails And the output should contain "should assign @example" Scenario: generate a Rails application that mixes Rspec and Test::Unit - When I configure the application to use rspec-rails in test and development + When I configure the application to use rspec and rspec-rails in test and development And I configure the application to use "shoulda-matchers" from this project in test and development And I run the rspec generator And I write to "spec/models/user_spec.rb" with: diff --git a/features/step_definitions/rails_steps.rb b/features/step_definitions/rails_steps.rb index 4eb5dd1d..4682eb68 100644 --- a/features/step_definitions/rails_steps.rb +++ b/features/step_definitions/rails_steps.rb @@ -52,14 +52,16 @@ When 'I run the rspec generator' do } end -When 'I configure the application to use rspec-rails' do +When 'I configure the application to use rspec and rspec-rails' do + append_to_gemfile %q(gem 'rspec', '~> 2.13') append_to_gemfile %q(gem 'rspec-rails', '~> 2.13') steps %{And I run `bundle install --local`} end -When 'I configure the application to use rspec-rails in test and development' do +When 'I configure the application to use rspec and rspec-rails in test and development' do append_to_gemfile <<-GEMFILE group :test, :development do + gem 'rspec', '~> 2.13' gem 'rspec-rails', '~> 2.13' end GEMFILE