require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe 'Suhyo Webrat Steps' do include ::CukeTest before :all do CukeTest.config.features_path = File.expand_path(File.dirname(__FILE__) + '/features') end describe 'I should see a link that says "..."' do it 'passes if there is a link with the text' do scenario('webrat.feature', 'link text expected, found').should pass_cuke end it 'fails if there is not link with the text' do scenario('webrat.feature', 'link text expected, not found').should fail_cuke end end describe 'I should not see a link that says ...' do it 'passes if there is not a link with the text' do scenario('webrat.feature', 'link text not expected, not found').should pass_cuke end it 'fails if there is a link with the text' do scenario('webrat.feature', 'link text not expected, found').should fail_cuke end end describe 'I should see a link to ...' do it 'passes if there is a link with the URL' do scenario('webrat.feature', 'link URL expected, found').should pass_cuke end it 'fails if there is not a link with the URL' do scenario('webrat.feature', 'link URL expected, not found').should fail_cuke end end describe 'I should not see a link to ...' do it 'passes if there is not a link with the URL' do scenario('webrat.feature', 'link URL not expected, not found').should pass_cuke end it 'fails if there is a link with the URL' do scenario('webrat.feature', 'link URL not expected, found').should fail_cuke end end describe 'I should see a button that says ...' do it 'passes if there is a button with the text' do scenario('webrat.feature', 'button text expected, found').should pass_cuke end it 'fails if there is not a button with the text' do scenario('webrat.feature', 'button text expected, not found').should fail_cuke end end describe 'I should not see a button that says ...' do it 'passes if there is not a button with the text' do scenario('webrat.feature', 'button text not expected, not found').should pass_cuke end it 'fails if there is a button with the text' do scenario('webrat.feature', 'button text not expected, found').should fail_cuke end end describe 'the page title should be ...' do it 'passes is the page title is correct' do scenario('webrat.feature', 'page title correct').should pass_cuke end it 'fails if the page title is incorrect' do scenario('webrat.feature', 'page title wrong').should fail_cuke end end describe 'I should see ... before ...' do it 'passes if the content is found before the reference content' do scenario('webrat.feature', 'content expected before, found before').should pass_cuke end it 'fails if the content is found after the reference content' do scenario('webrat.feature', 'content expected before, found after').should fail_cuke end end describe 'I should see ... after ...' do it 'passes if the content is found after the reference content' do scenario('webrat.feature', 'content expected after, found after').should pass_cuke end it 'fails if the content is found before the reference content' do scenario('webrat.feature', 'content expected after, found before').should fail_cuke end end describe 'I should be at (.+) with the query string ...' do it 'passes if the query string matches' do scenario('webrat.feature', 'query string expected, found').should pass_cuke end it 'fails if the query string does not match' do scenario('webrat.feature', 'query string expected, not found').should fail_cuke end it 'fails if the path does not match' do scenario('webrat.feature', 'query string expected, path wrong').should fail_cuke end end describe 'I should be at (.+) with the query string including ...' do it 'passes if the query string includes the hash' do scenario('webrat.feature', 'partial query string expected, found').should pass_cuke end it 'fails if the query string does not include the hash' do scenario('webrat.feature', 'partial query string expected, not found').should fail_cuke end it 'fails if the path does not match' do scenario('webrat.feature', 'partial query string expected, path wrong').should fail_cuke end end end