spinach 0.8.8 → 0.8.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a4a7688b9f7af807e9ffa56dc81fbfcd284b5b15
4
- data.tar.gz: 0b0da6bb8d6ea72ab5e51c9090c2d09f4fc0067d
3
+ metadata.gz: 8c1f5d14fd17c664d04af5c26331b5ebdffd68d6
4
+ data.tar.gz: 516f1ca8cd7a2e5e63c9cdbfe805668c196e2e37
5
5
  SHA512:
6
- metadata.gz: 4aab211a57a9c500aa89b02d277a75fa14801f60c869ab03d9f9bd723e9f2100778876f02cdeac6cacdf072de9fa28541ee77ad06dcec181b5c0c69d43122127
7
- data.tar.gz: d5acad37f9c42283f34b73f631db893145bd2bcc9428f8f38c8f357f3c5adebd4f36eeef57894e516e4957949ba4191309b5337e8cdd1078069da3a4ecc2a724
6
+ metadata.gz: 217336b4e2db284a25387fb5fb6fc4906913992879d8fd25f51ff5f2abf35b060b9789e9450e664751d187fb274f4decf1a21814cb328491e1c3ffc61b2e88e5
7
+ data.tar.gz: 9d21d91f3894fedda12acbec8761a39dfa02d59a52fec3d5e28d58b6d845b30684c0ab1a6cbe8f997d9a4f09ee27c8356a52315a390221e7d004b8934fc072e1
@@ -17,33 +17,26 @@ module Spinach
17
17
  # end
18
18
  #
19
19
  module Capybara
20
- class CapybaraDslDelegator
21
- include ::Capybara::DSL
22
- if defined?(RSpec)
23
- require 'rspec/matchers'
24
- require 'capybara/rspec'
25
- include ::Capybara::RSpecMatchers
26
- end
20
+ include ::Capybara::DSL
21
+
22
+ if defined?(RSpec)
23
+ require 'rspec/matchers'
24
+ require 'capybara/rspec'
25
+ include ::Capybara::RSpecMatchers
27
26
  end
28
27
 
28
+ alias_method :capybara_visit, :visit
29
+
29
30
  def visit(*args)
30
31
  stream = STDOUT
31
32
  old_stream = stream.dup
32
33
  stream.reopen(null_device)
33
34
  stream.sync = true
34
- instance.visit *args
35
+ capybara_visit *args
35
36
  ensure
36
37
  stream.reopen(old_stream)
37
38
  end
38
39
 
39
- def instance
40
- @instance ||= CapybaraDslDelegator.new
41
- end
42
-
43
- def method_missing(m, *args)
44
- instance.send m, *args
45
- end
46
-
47
40
  def null_device
48
41
  return @null_device if defined?(@null_device)
49
42
 
@@ -1,4 +1,4 @@
1
1
  module Spinach
2
2
  # Spinach version.
3
- VERSION = "0.8.8"
3
+ VERSION = "0.8.9"
4
4
  end
@@ -59,7 +59,7 @@ Feature: A test feature
59
59
  }
60
60
 
61
61
  it 'responds to Capybara::DSL methods' do
62
- @feature.respond_to?(:page).must_equal false
62
+ @feature.respond_to?(:page).must_equal true
63
63
  end
64
64
 
65
65
  it 'does not respond to non Capybara::DSL methods' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spinach
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.8
4
+ version: 0.8.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2014-04-04 00:00:00.000000000 Z
14
+ date: 2014-04-14 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: gherkin-ruby