Convert footers to Markdown (#23)
[www.martinvillalba.com.git] / res / blueprint / features / step_definitions / blueprint_steps.rb
blob5092880722b5cd57314afaa886b97b24b8c025bf
1 When /^I generate Blueprint stylesheets$/ do
2   When %{I run `#{blueprint_command}`}
3 end
5 When /^I generate Blueprint stylesheets with the options "([^"]*)"$/ do |options|
6   When %{I run `#{blueprint_command(options)}`}
7 end
9 When /^I open the HTML page using the styles with the content:$/ do |string|
10   BlueprintApp.current_response = html_page_content { string }
11   visit("/")
12 end
14 Then /^the "([^"]*)" should be below "([^"]*)"$/ do |selector_1, selector_2|
15   element(selector_1).height.should >= element(selector_2).top
16 end
18 Then /^the "([^"]*)" should be next to "([^"]*)"$/ do |selector_1, selector_2|
19   element(selector_1).top.should >= element(selector_2).top &&
20     element(selector_1).top.should <= element(selector_2).bottom
21 end
23 Then /^the "([^"]*)" should have a width of (\d+)px$/ do |selector, width|
24   element(selector).width.should == width.to_i
25 end
27 Then /^the "([^"]*)" should have a right margin of (\d+)px$/ do |selector, margin|
28   element(selector).margin.right.should == margin.to_i
29 end
31 Then /^the "([^"]*)" should have a background image matching "([^"]*)"$/ do |selector, image|
32   element(selector).background.image.should =~ %r{#{image}}
33 end
35 Then /^the "([^"]*)" should have a background color of "([^"]*)"$/ do |selector, rgb|
36   element(selector).background.color.should == rgb
37 end