minitest-capybara 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -25,7 +25,7 @@ Add to Gemfile:
25
25
  ```ruby
26
26
  # Gemfile
27
27
  group :test do
28
- gem "minitest-matchers-capybara"
28
+ gem "minitest-capybara"
29
29
  end
30
30
  ```
31
31
 
@@ -47,7 +47,7 @@ Finally, you can use it like this:
47
47
 
48
48
  ```ruby
49
49
  # test/acceptance/home_test.rb
50
- require "test/test_helper"
50
+ require "test_helper"
51
51
 
52
52
  class HomeTest < AcceptanceTest
53
53
  it "home test" do
@@ -57,6 +57,33 @@ class HomeTest < AcceptanceTest
57
57
  end
58
58
  ```
59
59
 
60
+ ## Capybara drivers
61
+
62
+ Switching drivers is easy with [minitest-metadata]:
63
+
64
+ [minitest-metadata]: https://github.com/wojtekmach/minitest-metadata
65
+
66
+ ```ruby
67
+ require 'minitest-metadata'
68
+
69
+ class AcceptanceTest
70
+ before do
71
+ if metadata[:js]
72
+ Capybara.current_driver = Capybara.javascript_driver
73
+ else
74
+ Capybara.current_driver = Capybara.default_driver
75
+ end
76
+ end
77
+ end
78
+
79
+ class HomeTest < AcceptanceTest
80
+ it "home with ajax", js: true do
81
+ visit "/"
82
+ must_have_content "AJAX enabled..."
83
+ end
84
+ end
85
+ ```
86
+
60
87
  ## License
61
88
 
62
89
  (The MIT License)
@@ -4,7 +4,7 @@ require "capybara/rspec/matchers"
4
4
 
5
5
  module Minitest
6
6
  module Capybara
7
- VERSION = "0.1.0"
7
+ VERSION = "0.2.0"
8
8
  end
9
9
  end
10
10
 
@@ -18,6 +18,8 @@ Gem::Specification.new do |s|
18
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
19
  s.require_paths = ["lib"]
20
20
 
21
- s.add_dependency "minitest-matchers", ">= 1.2"
22
- s.add_dependency "capybara", ">= 1.0"
21
+ s.add_dependency "minitest-matchers", "~> 1.2"
22
+ s.add_dependency "capybara", "~> 1.0"
23
+
24
+ s.add_runtime_dependency "rake"
23
25
  end
@@ -1,6 +1,4 @@
1
- require "rack"
2
- require "minitest/matchers"
3
- require "minitest-matchers-capybara"
1
+ require "minitest-capybara"
4
2
  require "minitest/autorun"
5
3
 
6
4
  describe "test" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-capybara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,30 +9,56 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-09 00:00:00.000000000 Z
12
+ date: 2013-04-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest-matchers
16
- requirement: &70327771207080 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ! '>='
19
+ - - ~>
20
20
  - !ruby/object:Gem::Version
21
21
  version: '1.2'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70327771207080
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '1.2'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: capybara
27
- requirement: &70327771206520 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
- - - ! '>='
35
+ - - ~>
31
36
  - !ruby/object:Gem::Version
32
37
  version: '1.0'
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *70327771206520
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '1.0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rake
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
36
62
  description: Capybara matchers support for minitest unit and spec
37
63
  email:
38
64
  - wojtek@wojtekmach.pl
@@ -59,18 +85,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
59
85
  - - ! '>='
60
86
  - !ruby/object:Gem::Version
61
87
  version: '0'
88
+ segments:
89
+ - 0
90
+ hash: -2882241969094489830
62
91
  required_rubygems_version: !ruby/object:Gem::Requirement
63
92
  none: false
64
93
  requirements:
65
94
  - - ! '>='
66
95
  - !ruby/object:Gem::Version
67
96
  version: '0'
97
+ segments:
98
+ - 0
99
+ hash: -2882241969094489830
68
100
  requirements: []
69
101
  rubyforge_project: minitest-capybara
70
- rubygems_version: 1.8.11
102
+ rubygems_version: 1.8.25
71
103
  signing_key:
72
104
  specification_version: 3
73
105
  summary: Capybara matchers support for minitest unit and spec
74
106
  test_files:
75
107
  - test/minitest-capybara_test.rb
76
- has_rdoc: