capybara_minitest_spec 1.0.5 → 1.0.6

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: 6a6a748cfac03182125c90c7ac0f42ae56535bf8
4
- data.tar.gz: 17ee34f566594752a0bbfc9ce154e30b2ccc62aa
3
+ metadata.gz: dc2aa57eb85c1150d7aee64dcc85ffb159b01c31
4
+ data.tar.gz: b37bb15f6bcfdfcb221c4c3a4cf335b05fc1b0d0
5
5
  SHA512:
6
- metadata.gz: 73c552ac20b513d98bfc3d80fb51b45cfc18fffe92e1574b8105b048bf35d893d6ad7779498b6b7c8e088e3c0e5bb04ded0e2467dd8233324308d5cd5ff2e0b2
7
- data.tar.gz: 45c86ab1b30e1d52ebd1c9ae978459a1047fe683a317769ffd3bd12a1aaf6c65daed545ad877e45825136291b012262b0ec0ae29125811e05a2dae059b967e53
6
+ metadata.gz: af39c9eedeb12923d5fa93968cd1d27c8ea0fd698378d8959e10a97cbe6c8fa2c4e4a15af205eb8bc9a9ef26b9e99c975795fcddcc25cfa818c47040b43cbad1
7
+ data.tar.gz: d522045ed73e1d03561fa943f06937b1507bcbcd1435c3f7f1d5c37580418264a0b6245c5c27c215c77f10075ac5e697fd6eb04e6e77f27ff0175ab89933ea92
data/.travis.yml CHANGED
@@ -1,8 +1,10 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
- - 2.0.0
3
+ # I removed travis support for 1.9.3 because of a seemingly unrelated test failure
4
+ # https://travis-ci.org/ordinaryzelig/capybara_minitest_spec/jobs/95284311.
5
+ # But I have no reason to believe that it shouldn't still work.
6
+ # - 1.9.3
5
7
  - 2.1.0
8
+ - 2.2.2
6
9
  gemfile:
7
10
  - Gemfile
8
- - gemfiles/Gemfile_minitest_4
data/Gemfile.lock CHANGED
@@ -1,37 +1,43 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capybara_minitest_spec (1.0.5)
4
+ capybara_minitest_spec (1.0.6)
5
5
  capybara (>= 2)
6
6
  minitest (>= 4)
7
7
 
8
8
  GEM
9
9
  remote: http://rubygems.org/
10
10
  specs:
11
- awesome_print (1.2.0)
12
- capybara (2.4.4)
11
+ addressable (2.5.1)
12
+ public_suffix (~> 2.0, >= 2.0.2)
13
+ awesome_print (1.6.1)
14
+ capybara (2.14.3)
15
+ addressable
13
16
  mime-types (>= 1.16)
14
17
  nokogiri (>= 1.3.3)
15
18
  rack (>= 1.0.0)
16
19
  rack-test (>= 0.5.4)
17
20
  xpath (~> 2.0)
18
- mime-types (2.4.3)
19
- mini_portile (0.6.1)
20
- minitest (5.4.2)
21
- nokogiri (1.6.4.1)
22
- mini_portile (~> 0.6.0)
23
- rack (1.5.2)
21
+ mime-types (3.1)
22
+ mime-types-data (~> 3.2015)
23
+ mime-types-data (3.2016.0521)
24
+ mini_portile2 (2.2.0)
25
+ minitest (5.10.2)
26
+ nokogiri (1.8.0)
27
+ mini_portile2 (~> 2.2.0)
28
+ public_suffix (2.0.5)
29
+ rack (1.6.4)
24
30
  rack-protection (1.5.3)
25
31
  rack
26
- rack-test (0.6.2)
32
+ rack-test (0.6.3)
27
33
  rack (>= 1.0)
28
- rake (10.3.1)
29
- sinatra (1.4.5)
34
+ rake (10.4.2)
35
+ sinatra (1.4.6)
30
36
  rack (~> 1.4)
31
37
  rack-protection (~> 1.4)
32
- tilt (~> 1.3, >= 1.3.4)
33
- tilt (1.4.1)
34
- xpath (2.0.0)
38
+ tilt (>= 1.3, < 3)
39
+ tilt (2.0.1)
40
+ xpath (2.1.0)
35
41
  nokogiri (~> 1.3)
36
42
 
37
43
  PLATFORMS
@@ -42,3 +48,6 @@ DEPENDENCIES
42
48
  capybara_minitest_spec!
43
49
  rake
44
50
  sinatra (>= 0.9.4)
51
+
52
+ BUNDLED WITH
53
+ 1.15.1
data/README.md CHANGED
@@ -51,9 +51,19 @@ NOTE: If after installing the Capybara gem, Nokogiri isn't installed, it's a kno
51
51
 
52
52
  ### Rails
53
53
 
54
- * [My blog] (http://redningja.com/dev/minitest-spec-setup-with-capybara-in-rails-3-1/)
54
+ * [My blog] (http://redningja.com/dev/minitest-spec-setup-with-capybara-in-rails-3-1)
55
55
  * [Railscast (pro episode)] (http://railscasts.com/episodes/327-minitest-with-rails)
56
56
 
57
+ If you choose to use Rails's default ActionDispatch::IntegrationTest, just extend Minitest::Spec::DSL. E.g.
58
+
59
+ ```ruby
60
+ # Maybe in a helper or something.
61
+ ActionDispatch::IntegrationTest.extend Minitest::Spec::DSL
62
+ ```
63
+
64
+ Otherwise you may see this exception:
65
+ `NoMethodError: undefined method 'assert_page_has_content' for nil:NilClass`.
66
+
57
67
  ## Compatibility
58
68
 
59
69
  ### Capybara
@@ -68,6 +78,14 @@ Supports Minitest >= 4.
68
78
  It may work for earlier versions, I just haven't tested it.
69
79
  If you need it to support an earlier version, let me know and I'll see what I can do.
70
80
 
81
+ ### Ruby
82
+
83
+ Check .travis.yml.
84
+
85
+ ### Cucumber
86
+
87
+ Cucumber is not officially supported. See [#10](https://github.com/ordinaryzelig/capybara_minitest_spec/issues/10#issuecomment-152404532) for a possible workaround.
88
+
71
89
  ## Testing
72
90
 
73
91
  This gem was tested by basically copying the Capybara spec located in 'spec/rspec/matchers_spec.rb' and [altering the test to run with MiniTest](https://gist.github.com/4297afa19edd44885248).
@@ -0,0 +1,3 @@
1
+ Before do
2
+ Thread.current[:current_spec] = self
3
+ end
@@ -1,3 +1,3 @@
1
1
  module CapybaraMiniTestSpec
2
- VERSION = '1.0.5'
2
+ VERSION = '1.0.6'
3
3
  end
@@ -18,20 +18,21 @@ end
18
18
 
19
19
  module MiniTest::Assertions
20
20
  # Yield, rescue, compare exception's message.
21
- def assert_fails_with_message(exception_message)
22
- yield
21
+ def assert_fails_with_message(_proc, exception_message)
22
+ _proc.call
23
23
  rescue Exception => exception
24
24
  exception_raised = true
25
25
  assert_match exception_message, exception.message
26
26
  ensure
27
27
  assert exception_raised, 'expected exception to be raised'
28
28
  end
29
- Proc.infect_an_assertion :assert_fails_with_message, :must_fail_with_message
29
+ Proc.infect_an_assertion :assert_fails_with_message, :must_fail_with_message, :proc_first
30
30
  end
31
31
 
32
32
  # There is a capybara/spec/spec_helper, but the following lines seeem to be enough.
33
33
  # Also, capybara/spec/spec_helper requires rspec.
34
34
  require 'capybara/spec/test_app'
35
+ require 'capybara/dsl'
35
36
  Capybara.default_selector = :xpath
36
37
  Capybara.app = TestApp
37
38
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara_minitest_spec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jared Ning
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-11 00:00:00.000000000 Z
11
+ date: 2017-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -98,8 +98,8 @@ files:
98
98
  - README.md
99
99
  - Rakefile
100
100
  - capybara_minitest_spec.gemspec
101
- - gemfiles/Gemfile_minitest_4
102
101
  - lib/capybara_minitest_spec.rb
102
+ - lib/capybara_minitest_spec/cucumber_rails.rb
103
103
  - lib/capybara_minitest_spec/test_name.rb
104
104
  - lib/capybara_minitest_spec/version.rb
105
105
  - spec/capybara_minitest_spec.spec.rb
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  version: '0'
127
127
  requirements: []
128
128
  rubyforge_project: capybara_minitest_spec
129
- rubygems_version: 2.2.2
129
+ rubygems_version: 2.6.8
130
130
  signing_key:
131
131
  specification_version: 4
132
132
  summary: Capybara + MiniTest::Spec
@@ -1,5 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- gemspec path: '../'
4
-
5
- gem 'minitest', '< 5'