sandwich 0.0.18 → 0.0.19

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.18
1
+ 0.0.19
@@ -1,7 +1,11 @@
1
1
  require 'pp'
2
2
 
3
3
  Then /^show me the source$/ do
4
- puts page.body
4
+ begin
5
+ puts page.source
6
+ rescue Rack::Test::Error
7
+ puts response.body
8
+ end
5
9
  end
6
10
 
7
11
  Then /^show me all (.+)$/ do |targets|
@@ -8,10 +8,18 @@ end
8
8
 
9
9
  World(Sandwich::WithinHelper)
10
10
 
11
+ Given /^I(?:'m| am) on the page for (.+)$/ do |record|
12
+ visit(polymorphic_path(record))
13
+ end
14
+
11
15
  When /^I follow "([^\"]*)"(?: (?:with)?in (.+))$/ do |link, container|
12
16
  inside(xpath(selector_for(container))) { click_link(link) }
13
17
  end
14
18
 
19
+ When /^I follow (.+)$/ do |link|
20
+ click_link(selector_for(link))
21
+ end
22
+
15
23
  When /^I select "([^\"]*)" from (.+?)(?: (?:with)?in (.+))?$/ do |value, field_selector, container|
16
24
  inside(xpath(container)) { select(value, :from => selector_for(field_selector)) }
17
25
  end
@@ -20,7 +20,7 @@ module Sandwich
20
20
 
21
21
  def blueprint(name = :master, &blueprints)
22
22
  if block_given?
23
- Machinist::Materializer[self.name.underscore] = self unless name == :master
23
+ Machinist::Materializer[name] = self unless name == :master
24
24
  end
25
25
 
26
26
  super
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 18
9
- version: 0.0.18
8
+ - 19
9
+ version: 0.0.19
10
10
  platform: ruby
11
11
  authors:
12
12
  - David Leal
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-06-02 00:00:00 +01:00
17
+ date: 2010-06-09 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency