Sha256: 15984bacf685030dac4a3503361b40a79d9d1d2acb63d62e4d58fd56243837f1

Contents?: true

Size: 975 Bytes

Versions: 27

Compression:

Stored size: 975 Bytes

Contents

# encoding: utf-8

# HTTP 200
Then "it should respond successfuly" do
  @response.should be_successful
end

# not HTTP 200
Then "the (.*) ?request should fail" do |_|
  @response.should_not be_successful
end

# HTTP 404, 406, 500
Then /it should have status (\d{3})/ do |status|
  @response.status.should eql(status.to_i)
end

Then /^(\w+) should be redirected to "(.+)"$/ do |who, uri|
  @response.should redirect_to(uri)
end

# content type
Then /it should render page in (\w+) format/ do |format|
  @response.should have_content_type(format.to_sym)
end

# have given content
Then /^I should see "(.*)"$/ do |text|
  #@response.body.to_s.should =~ /#{text}/m
  @response.body.should have_content(text)
end

# have not given content
Then /^I should not see "(.*)"$/ do |text|
  @response.body.to_s.should_not =~ /#{text}/m
end

# have given message
Then /^I should see an? (\w+) message$/ do |message_type|
  @response.should have_xpath("//*[@class='#{message_type}']")
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
rango-0.2.6 lib/rango/support/cucumber/steps/then_steps.rb
rango-0.2.5.1 lib/rango/support/cucumber/steps/then_steps.rb
rango-0.2.4.1 lib/rango/support/cucumber/steps/then_steps.rb
rango-0.2.3 lib/rango/support/cucumber/steps/then_steps.rb
rango-0.2.1 lib/rango/support/cucumber/steps/then_steps.rb
rango-0.2.1.pre lib/rango/support/cucumber/steps/then_steps.rb
rango-0.2 lib/rango/support/cucumber/steps/then_steps.rb
rango-0.1.1.3 lib/rango/support/cucumber/steps/then_steps.rb
rango-0.1.1.2.11 lib/rango/support/cucumber/steps/then_steps.rb
rango-0.1.1.2.10 lib/rango/support/cucumber/steps/then_steps.rb
rango-0.1.1.2.9 lib/rango/support/cucumber/steps/then_steps.rb
rango-0.1.1.2.8 lib/rango/support/cucumber/steps/then_steps.rb
rango-0.1.1.2.7 lib/rango/support/cucumber/steps/then_steps.rb
rango-0.1.1.2.6 lib/rango/support/cucumber/steps/then_steps.rb
rango-0.1.1.2.5 lib/rango/support/cucumber/steps/then_steps.rb
rango-0.1.1.2.4 lib/rango/support/cucumber/steps/then_steps.rb
rango-0.1.1.2.3 lib/rango/support/cucumber/steps/then_steps.rb
rango-0.1.1.2.2 lib/rango/support/cucumber/steps/then_steps.rb
rango-0.1.1.2.1 lib/rango/support/cucumber/steps/then_steps.rb
rango-0.2.pre lib/rango/support/cucumber/steps/then_steps.rb