Sha256: c1f41a7b0ea68da735df14528097eae3e1ef98db63f9c239e75b4c35d3a8019e
Contents?: true
Size: 1018 Bytes
Versions: 8
Compression:
Stored size: 1018 Bytes
Contents
Given /^"([^\"]*)" feature is "([^\"]*)"$/ do |feature, state| if state == "enabled" Middleman::Server.activate(feature.to_sym) end Middleman::Server.environment = @current_env || :development @browser = Rack::Test::Session.new(Rack::MockSession.new(Middleman::Server.new)) end Given /^current environment is "([^\"]*)"$/ do |env| @current_env = env.to_sym end Given /^the Server is running$/ do @browser = Rack::Test::Session.new(Rack::MockSession.new(Middleman::Server.new)) end When /^I go to "([^\"]*)"$/ do |url| @browser.get(url) end Then /^I should see "([^\"]*)"$/ do |expected| @browser.last_response.body.should include(expected) end Then /^I should see '([^\']*)'$/ do |expected| @browser.last_response.body.should include(expected) end Then /^I should not see "([^\"]*)"$/ do |expected| @browser.last_response.body.should_not include(expected) end Then /^I should see "([^\"]*)" lines$/ do |lines| @browser.last_response.body.chomp.split($/).length.should == lines.to_i end
Version data entries
8 entries across 8 versions & 1 rubygems