Permalink
Browse files

updated cucumber-rails

  • Loading branch information...
1 parent 6c12ce4 commit a1e7508c08eda270de55a83efe2b7878b4434714 @khustochka committed Jan 8, 2010
Showing with 5 additions and 3 deletions.
  1. +1 −1 config/environments/cucumber.rb
  2. +4 −2 features/step_definitions/web_steps.rb
@@ -21,7 +21,7 @@
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
-config.gem 'cucumber-rails', :lib => false, :version => '>=0.2.2' unless File.directory?(File.join(Rails.root, 'vendor/plugins/cucumber-rails'))
+config.gem 'cucumber-rails', :lib => false, :version => '>=0.2.3' unless File.directory?(File.join(Rails.root, 'vendor/plugins/cucumber-rails'))
config.gem 'database_cleaner', :lib => false, :version => '>=0.2.3' unless File.directory?(File.join(Rails.root, 'vendor/plugins/database_cleaner'))
config.gem 'webrat', :lib => false, :version => '>=0.6.0' unless File.directory?(File.join(Rails.root, 'vendor/plugins/webrat'))
config.gem 'rspec', :lib => false, :version => '>=1.2.9' unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec'))
@@ -5,6 +5,7 @@
# files.
+require 'uri'
require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
# Commonly used webrat steps
@@ -255,10 +256,11 @@
end
Then /^(?:|I )should be on (.+)$/ do |page_name|
+ current_path = URI.parse(current_url).select(:path, :query).compact.join('?')
if defined?(Spec::Rails::Matchers)
- URI.parse(current_url).path.should == path_to(page_name)
+ current_path.should == path_to(page_name)
else
- assert_equal path_to(page_name), URI.parse(current_url).path
+ assert_equal path_to(page_name), current_path
end
end

0 comments on commit a1e7508

Please sign in to comment.