minitest-capybara 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YjU4ZjVlZDU2NjAzZGVhYmZhNDgxZjYwMjQzZWFhYjlmYTU3OWE0ZQ==
5
- data.tar.gz: !binary |-
6
- ZTNhNTUzMmMwNGZkYjhjZWJkMGQyNGIwMzU1MzMwNmJmMDBhZTBlYg==
2
+ SHA1:
3
+ metadata.gz: 990ef26c60cacebe8dc96e6f57dba1085f57d9c6
4
+ data.tar.gz: 94b17eeba7c455a07a919635562baedd6f68c6ab
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- YmYwZGU5MzZjNDRkYTMxOGRiMDRkYzBjODlkMDQwZmY4MjFjY2Q5OTcwZWQ2
10
- ZGIzOGNkYWRlOTY2NjgwYzg5OWI3NTQ2NzIxYzc5Zjc0ZmQ2ZWVlMmYyNmQ1
11
- OTEzMjMxYTYzNzA5YzYxNjJjZWMyZWJjNTQyNGEwOGM2NzUyNjU=
12
- data.tar.gz: !binary |-
13
- NWYzOWEzYjc0MjRlNDdlMGU4ZjE3YmJjM2IzNGY1MjZlODkzNTk4M2JhNGI2
14
- NzhkZjRmYjEwZjJhMGFkNzQyZTg1YjBhN2E4Nzg1YWNkZWI3NDVkYjk4NmEz
15
- YzNkNjBkOGZkYzJjOTYwY2RjNTU3ZmVlOWQwY2YxMTBjMDdhZGM=
6
+ metadata.gz: f5ca70f65877118120e98ae1efd48addae12d68e062b0b3faafe5ea43d47fe68331dde9a29985d39b925cf3b79f8b3f524c9c513741f5dbc314b7d7ea001e2ef
7
+ data.tar.gz: b1db56af48fbdd5e4cb8b9bf574dc169fbc9f90c0e1058a46669dcc6eaf6c33ba958f3c922d6245330094cb25916dd44416d9404dcfff81425c651c1929c473c
@@ -5,6 +5,9 @@ rvm:
5
5
  - 2.2
6
6
  - 2.3.0
7
7
 
8
+ sudo: false
9
+ script: RUBYOPT="-w $RUBYOPT" bundle exec rake
10
+
8
11
  before_install:
9
12
  - gem update bundler
10
13
 
@@ -1,5 +1,10 @@
1
1
  ## HEAD
2
2
 
3
+ ## v0.8.2
4
+
5
+ * Explicitly require capybara/dsl
6
+ * Introduce Minitest::Capybara::Behaviour that can be mixed in to test/spec classes
7
+
3
8
  ## v0.8.1
4
9
 
5
10
  * Do an assertion with `assert_selector`/`refute_selector` call - @joseramonc, @wojtekmach
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013-2015 Wojciech Mach
1
+ Copyright (c) 2013-2016 Wojciech Mach
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -72,6 +72,30 @@ class HomeSpec < Minitest::Capybara::Spec
72
72
  end
73
73
  ```
74
74
 
75
+ Instead of inheriting directly from Minitest::Capybara::Test (or Spec) it's usually better to create a custom test base class:
76
+
77
+ ```ruby
78
+ # test/acceptance_test_helper.rb
79
+ require "minitest/autorun"
80
+
81
+ class AcceptanceTest < Minitest::Capybara::Test
82
+ # custom methods, before blocks etc.
83
+ end
84
+ ```
85
+
86
+ If you need to inherit from a different base class (e.g. `ActiveSupport::TestCase`) you can do this instead:
87
+
88
+ ```ruby
89
+ # test/acceptance_test_helper.rb
90
+ require "test_helper"
91
+
92
+ class AcceptanceTest < ActiveSupport::TestCase
93
+ include Minitest::Capybara::Behaviour
94
+
95
+ # custom methods, before blocks etc.
96
+ end
97
+ ```
98
+
75
99
  ## Capybara drivers
76
100
 
77
101
  Switching drivers is easy with [minitest-metadata]:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.1
1
+ 0.8.2
@@ -1,4 +1,5 @@
1
1
  require "capybara"
2
+ require "capybara/dsl"
2
3
  require "minitest/capybara/version"
3
4
 
4
5
  module Minitest
@@ -24,7 +25,7 @@ require "capybara/expectations"
24
25
 
25
26
  module Minitest
26
27
  module Capybara
27
- class Test < Minitest::Test
28
+ module Behaviour
28
29
  include ::Capybara::DSL
29
30
  include ::Capybara::Assertions
30
31
 
@@ -34,14 +35,12 @@ module Minitest
34
35
  end
35
36
  end
36
37
 
37
- class Spec < Minitest::Spec
38
- include ::Capybara::DSL
39
- include ::Capybara::Assertions
38
+ class Test < Minitest::Test
39
+ include Behaviour
40
+ end
40
41
 
41
- def teardown
42
- ::Capybara.reset_session!
43
- ::Capybara.use_default_driver
44
- end
42
+ class Spec < Minitest::Spec
43
+ include Behaviour
45
44
  end
46
45
  end
47
46
  end
@@ -42,8 +42,8 @@ describe Capybara do
42
42
  end
43
43
 
44
44
  it "supports must_have_content with regexp" do
45
- @test_node.must_have_content /simple e-mail/
46
- @test_node.must_have_content /just.*tested/
45
+ @test_node.must_have_content(/simple e-mail/)
46
+ @test_node.must_have_content(/just.*tested/)
47
47
  end
48
48
 
49
49
  it "wont have Regexp content in a String" do
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-capybara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wojciech Mach
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-03 00:00:00.000000000 Z
11
+ date: 2016-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '5.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '5.0'
55
55
  description: Capybara matchers support for minitest unit and spec
@@ -59,8 +59,8 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
- - .gitignore
63
- - .travis.yml
62
+ - ".gitignore"
63
+ - ".travis.yml"
64
64
  - CHANGELOG.md
65
65
  - Gemfile
66
66
  - LICENSE.txt
@@ -87,12 +87,12 @@ require_paths:
87
87
  - lib
88
88
  required_ruby_version: !ruby/object:Gem::Requirement
89
89
  requirements:
90
- - - ! '>='
90
+ - - ">="
91
91
  - !ruby/object:Gem::Version
92
92
  version: '0'
93
93
  required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - ! '>='
95
+ - - ">="
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
98
  requirements: []
@@ -101,4 +101,10 @@ rubygems_version: 2.5.1
101
101
  signing_key:
102
102
  specification_version: 4
103
103
  summary: Capybara matchers support for minitest unit and spec
104
- test_files: []
104
+ test_files:
105
+ - test/capybara/assertions_test.rb
106
+ - test/capybara/expectations_test.rb
107
+ - test/minitest/base_node_test.rb
108
+ - test/minitest/capybara_test.rb
109
+ - test/test_helper.rb
110
+ has_rdoc: