aktion_test_rails 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format progress
data/.travis.yml ADDED
@@ -0,0 +1,11 @@
1
+ rvm:
2
+ - 1.9.2
3
+ - 1.9.3
4
+
5
+ script: "bundle exec rake spec"
6
+
7
+ gemfile:
8
+ - gemfiles/3.0.gemfile
9
+ - gemfiles/3.1.gemfile
10
+ - gemfiles/3.2.gemfile
11
+
data/Appraisals ADDED
@@ -0,0 +1,15 @@
1
+ appraise '3.0' do
2
+ gem 'rails', '3.0.17'
3
+ end
4
+
5
+ appraise '3.1' do
6
+ gem 'rails', '3.1.8'
7
+ gem 'jquery-rails'
8
+ gem 'sass-rails'
9
+ end
10
+
11
+ appraise '3.2' do
12
+ gem 'rails', '3.2.9'
13
+ gem 'jquery-rails'
14
+ gem 'sass-rails'
15
+ end
data/Gemfile CHANGED
@@ -2,3 +2,6 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in aktion_test_rails.gemspec
4
4
  gemspec
5
+
6
+ gem 'sqlite3', :platform => :ruby
7
+
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # AktionTestRails
2
2
 
3
- TODO: Write a gem description
3
+ [![Build Status](https://secure.travis-ci.org/AktionLab/aktion_test_rails.png?branch=master)](https://travis-ci.org/AktionLab/aktion_test_rails)
4
+
5
+ Testing gem that includes a common set of testing gems, along with a suite of rspec matchers
4
6
 
5
7
  ## Installation
6
8
 
data/Rakefile CHANGED
@@ -1,2 +1,18 @@
1
1
  #!/usr/bin/env rake
2
+ require 'bundler/setup'
2
3
  require "bundler/gem_tasks"
4
+ require 'rspec/core/rake_task'
5
+ require 'appraisal'
6
+
7
+ RSpec::Core::RakeTask.new do |t|
8
+ t.pattern = "spec/**/*_spec.rb"
9
+ t.rspec_opts = '--color --format progress'
10
+ t.verbose = false
11
+ end
12
+
13
+ desc 'Test the plugin under all supported Rails versions.'
14
+ task :all => ["appraisal:cleanup", "appraisal:install"] do
15
+ exec('rake appraisal spec')
16
+ end
17
+
18
+ task :default => [:all]
@@ -17,12 +17,13 @@ Gem::Specification.new do |gem|
17
17
 
18
18
  gem.add_dependency 'aktion_test', '= 0.0.1'
19
19
  gem.add_dependency 'rspec-rails', '~> 2.11.0'
20
- gem.add_dependency 'cucumber-rails', '~> 1.3.0'
21
20
  gem.add_dependency 'factory_girl_rails', '~> 4.0.0'
22
21
  gem.add_dependency 'database_cleaner', '~> 0.8.0'
23
- gem.add_dependency 'email_spec', '~> 1.2.1'
24
22
  gem.add_dependency 'capybara', '~> 1.1.2'
25
- gem.add_dependency 'capybara-webkit', '~> 0.12.1'
23
+ gem.add_dependency 'poltergeist', '~> 1.0.2'
26
24
  gem.add_dependency 'launchy', '~> 2.1.2'
27
25
  gem.add_dependency 'shoulda-matchers', '~> 1.3.0'
26
+
27
+ gem.add_development_dependency 'appraisal', '~> 0.5.1'
28
+ gem.add_development_dependency 'rails', '~> 3.0'
28
29
  end
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "sqlite3", :platform=>:ruby
6
+ gem "rails", "3.0.17"
7
+
8
+ gemspec :path=>"../"
@@ -0,0 +1,175 @@
1
+ PATH
2
+ remote: /home/chris/code/projects/aktion_test_rails
3
+ specs:
4
+ aktion_test_rails (0.0.2)
5
+ aktion_test (= 0.0.1)
6
+ capybara (~> 1.1.2)
7
+ database_cleaner (~> 0.8.0)
8
+ factory_girl_rails (~> 4.0.0)
9
+ launchy (~> 2.1.2)
10
+ poltergeist (~> 1.0.2)
11
+ rspec-rails (~> 2.11.0)
12
+ shoulda-matchers (~> 1.3.0)
13
+
14
+ GEM
15
+ remote: https://rubygems.org/
16
+ specs:
17
+ abstract (1.0.0)
18
+ actionmailer (3.0.17)
19
+ actionpack (= 3.0.17)
20
+ mail (~> 2.2.19)
21
+ actionpack (3.0.17)
22
+ activemodel (= 3.0.17)
23
+ activesupport (= 3.0.17)
24
+ builder (~> 2.1.2)
25
+ erubis (~> 2.6.6)
26
+ i18n (~> 0.5.0)
27
+ rack (~> 1.2.5)
28
+ rack-mount (~> 0.6.14)
29
+ rack-test (~> 0.5.7)
30
+ tzinfo (~> 0.3.23)
31
+ activemodel (3.0.17)
32
+ activesupport (= 3.0.17)
33
+ builder (~> 2.1.2)
34
+ i18n (~> 0.5.0)
35
+ activerecord (3.0.17)
36
+ activemodel (= 3.0.17)
37
+ activesupport (= 3.0.17)
38
+ arel (~> 2.0.10)
39
+ tzinfo (~> 0.3.23)
40
+ activeresource (3.0.17)
41
+ activemodel (= 3.0.17)
42
+ activesupport (= 3.0.17)
43
+ activesupport (3.0.17)
44
+ addressable (2.3.2)
45
+ aktion_test (0.0.1)
46
+ cucumber (~> 1.2.1)
47
+ factory_girl (~> 4.0.0)
48
+ faker (~> 1.0.1)
49
+ rspec (~> 2.11.0)
50
+ simplecov (~> 0.6.4)
51
+ timecop (~> 0.4.5)
52
+ appraisal (0.5.1)
53
+ bundler
54
+ rake
55
+ arel (2.0.10)
56
+ builder (2.1.2)
57
+ capybara (1.1.3)
58
+ mime-types (>= 1.16)
59
+ nokogiri (>= 1.3.3)
60
+ rack (>= 1.0.0)
61
+ rack-test (>= 0.5.4)
62
+ selenium-webdriver (~> 2.0)
63
+ xpath (~> 0.1.4)
64
+ childprocess (0.3.6)
65
+ ffi (~> 1.0, >= 1.0.6)
66
+ cucumber (1.2.1)
67
+ builder (>= 2.1.2)
68
+ diff-lcs (>= 1.1.3)
69
+ gherkin (~> 2.11.0)
70
+ json (>= 1.4.6)
71
+ database_cleaner (0.8.0)
72
+ diff-lcs (1.1.3)
73
+ erubis (2.6.6)
74
+ abstract (>= 1.0.0)
75
+ eventmachine (1.0.0)
76
+ factory_girl (4.0.0)
77
+ activesupport (>= 3.0.0)
78
+ factory_girl_rails (4.0.0)
79
+ factory_girl (~> 4.0.0)
80
+ railties (>= 3.0.0)
81
+ faker (1.0.1)
82
+ i18n (~> 0.4)
83
+ faye-websocket (0.4.6)
84
+ eventmachine (>= 0.12.0)
85
+ ffi (1.2.0)
86
+ gherkin (2.11.5)
87
+ json (>= 1.4.6)
88
+ http_parser.rb (0.5.3)
89
+ i18n (0.5.0)
90
+ json (1.7.5)
91
+ launchy (2.1.2)
92
+ addressable (~> 2.3)
93
+ libwebsocket (0.1.6.1)
94
+ websocket
95
+ mail (2.2.19)
96
+ activesupport (>= 2.3.6)
97
+ i18n (>= 0.4.0)
98
+ mime-types (~> 1.16)
99
+ treetop (~> 1.4.8)
100
+ mime-types (1.19)
101
+ multi_json (1.3.7)
102
+ nokogiri (1.5.5)
103
+ poltergeist (1.0.2)
104
+ capybara (~> 1.1)
105
+ childprocess (~> 0.3)
106
+ faye-websocket (~> 0.4, >= 0.4.4)
107
+ http_parser.rb (~> 0.5.3)
108
+ multi_json (~> 1.0)
109
+ polyglot (0.3.3)
110
+ rack (1.2.5)
111
+ rack-mount (0.6.14)
112
+ rack (>= 1.0.0)
113
+ rack-test (0.5.7)
114
+ rack (>= 1.0)
115
+ rails (3.0.17)
116
+ actionmailer (= 3.0.17)
117
+ actionpack (= 3.0.17)
118
+ activerecord (= 3.0.17)
119
+ activeresource (= 3.0.17)
120
+ activesupport (= 3.0.17)
121
+ bundler (~> 1.0)
122
+ railties (= 3.0.17)
123
+ railties (3.0.17)
124
+ actionpack (= 3.0.17)
125
+ activesupport (= 3.0.17)
126
+ rake (>= 0.8.7)
127
+ rdoc (~> 3.4)
128
+ thor (~> 0.14.4)
129
+ rake (10.0.2)
130
+ rdoc (3.12)
131
+ json (~> 1.4)
132
+ rspec (2.11.0)
133
+ rspec-core (~> 2.11.0)
134
+ rspec-expectations (~> 2.11.0)
135
+ rspec-mocks (~> 2.11.0)
136
+ rspec-core (2.11.1)
137
+ rspec-expectations (2.11.3)
138
+ diff-lcs (~> 1.1.3)
139
+ rspec-mocks (2.11.3)
140
+ rspec-rails (2.11.4)
141
+ actionpack (>= 3.0)
142
+ activesupport (>= 3.0)
143
+ railties (>= 3.0)
144
+ rspec (~> 2.11.0)
145
+ rubyzip (0.9.9)
146
+ selenium-webdriver (2.26.0)
147
+ childprocess (>= 0.2.5)
148
+ libwebsocket (~> 0.1.3)
149
+ multi_json (~> 1.0)
150
+ rubyzip
151
+ shoulda-matchers (1.3.0)
152
+ activesupport (>= 3.0.0)
153
+ simplecov (0.6.4)
154
+ multi_json (~> 1.0)
155
+ simplecov-html (~> 0.5.3)
156
+ simplecov-html (0.5.3)
157
+ sqlite3 (1.3.6)
158
+ thor (0.14.6)
159
+ timecop (0.4.6)
160
+ treetop (1.4.12)
161
+ polyglot
162
+ polyglot (>= 0.3.1)
163
+ tzinfo (0.3.35)
164
+ websocket (1.0.4)
165
+ xpath (0.1.4)
166
+ nokogiri (~> 1.3)
167
+
168
+ PLATFORMS
169
+ ruby
170
+
171
+ DEPENDENCIES
172
+ aktion_test_rails!
173
+ appraisal (~> 0.5.1)
174
+ rails (= 3.0.17)
175
+ sqlite3
@@ -0,0 +1,10 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "sqlite3", :platform=>:ruby
6
+ gem "rails", "3.1.8"
7
+ gem "jquery-rails"
8
+ gem "sass-rails"
9
+
10
+ gemspec :path=>"../"
@@ -0,0 +1,196 @@
1
+ PATH
2
+ remote: /home/chris/code/projects/aktion_test_rails
3
+ specs:
4
+ aktion_test_rails (0.0.2)
5
+ aktion_test (= 0.0.1)
6
+ capybara (~> 1.1.2)
7
+ database_cleaner (~> 0.8.0)
8
+ factory_girl_rails (~> 4.0.0)
9
+ launchy (~> 2.1.2)
10
+ poltergeist (~> 1.0.2)
11
+ rspec-rails (~> 2.11.0)
12
+ shoulda-matchers (~> 1.3.0)
13
+
14
+ GEM
15
+ remote: https://rubygems.org/
16
+ specs:
17
+ actionmailer (3.1.8)
18
+ actionpack (= 3.1.8)
19
+ mail (~> 2.3.3)
20
+ actionpack (3.1.8)
21
+ activemodel (= 3.1.8)
22
+ activesupport (= 3.1.8)
23
+ builder (~> 3.0.0)
24
+ erubis (~> 2.7.0)
25
+ i18n (~> 0.6)
26
+ rack (~> 1.3.6)
27
+ rack-cache (~> 1.2)
28
+ rack-mount (~> 0.8.2)
29
+ rack-test (~> 0.6.1)
30
+ sprockets (~> 2.0.4)
31
+ activemodel (3.1.8)
32
+ activesupport (= 3.1.8)
33
+ builder (~> 3.0.0)
34
+ i18n (~> 0.6)
35
+ activerecord (3.1.8)
36
+ activemodel (= 3.1.8)
37
+ activesupport (= 3.1.8)
38
+ arel (~> 2.2.3)
39
+ tzinfo (~> 0.3.29)
40
+ activeresource (3.1.8)
41
+ activemodel (= 3.1.8)
42
+ activesupport (= 3.1.8)
43
+ activesupport (3.1.8)
44
+ multi_json (>= 1.0, < 1.3)
45
+ addressable (2.3.2)
46
+ aktion_test (0.0.1)
47
+ cucumber (~> 1.2.1)
48
+ factory_girl (~> 4.0.0)
49
+ faker (~> 1.0.1)
50
+ rspec (~> 2.11.0)
51
+ simplecov (~> 0.6.4)
52
+ timecop (~> 0.4.5)
53
+ appraisal (0.5.1)
54
+ bundler
55
+ rake
56
+ arel (2.2.3)
57
+ builder (3.0.4)
58
+ capybara (1.1.3)
59
+ mime-types (>= 1.16)
60
+ nokogiri (>= 1.3.3)
61
+ rack (>= 1.0.0)
62
+ rack-test (>= 0.5.4)
63
+ selenium-webdriver (~> 2.0)
64
+ xpath (~> 0.1.4)
65
+ childprocess (0.3.6)
66
+ ffi (~> 1.0, >= 1.0.6)
67
+ cucumber (1.2.1)
68
+ builder (>= 2.1.2)
69
+ diff-lcs (>= 1.1.3)
70
+ gherkin (~> 2.11.0)
71
+ json (>= 1.4.6)
72
+ database_cleaner (0.8.0)
73
+ diff-lcs (1.1.3)
74
+ erubis (2.7.0)
75
+ eventmachine (1.0.0)
76
+ factory_girl (4.0.0)
77
+ activesupport (>= 3.0.0)
78
+ factory_girl_rails (4.0.0)
79
+ factory_girl (~> 4.0.0)
80
+ railties (>= 3.0.0)
81
+ faker (1.0.1)
82
+ i18n (~> 0.4)
83
+ faye-websocket (0.4.6)
84
+ eventmachine (>= 0.12.0)
85
+ ffi (1.2.0)
86
+ gherkin (2.11.5)
87
+ json (>= 1.4.6)
88
+ hike (1.2.1)
89
+ http_parser.rb (0.5.3)
90
+ i18n (0.6.1)
91
+ jquery-rails (2.1.3)
92
+ railties (>= 3.1.0, < 5.0)
93
+ thor (~> 0.14)
94
+ json (1.7.5)
95
+ launchy (2.1.2)
96
+ addressable (~> 2.3)
97
+ libwebsocket (0.1.6.1)
98
+ websocket
99
+ mail (2.3.3)
100
+ i18n (>= 0.4.0)
101
+ mime-types (~> 1.16)
102
+ treetop (~> 1.4.8)
103
+ mime-types (1.19)
104
+ multi_json (1.2.0)
105
+ nokogiri (1.5.5)
106
+ poltergeist (1.0.2)
107
+ capybara (~> 1.1)
108
+ childprocess (~> 0.3)
109
+ faye-websocket (~> 0.4, >= 0.4.4)
110
+ http_parser.rb (~> 0.5.3)
111
+ multi_json (~> 1.0)
112
+ polyglot (0.3.3)
113
+ rack (1.3.6)
114
+ rack-cache (1.2)
115
+ rack (>= 0.4)
116
+ rack-mount (0.8.3)
117
+ rack (>= 1.0.0)
118
+ rack-ssl (1.3.2)
119
+ rack
120
+ rack-test (0.6.2)
121
+ rack (>= 1.0)
122
+ rails (3.1.8)
123
+ actionmailer (= 3.1.8)
124
+ actionpack (= 3.1.8)
125
+ activerecord (= 3.1.8)
126
+ activeresource (= 3.1.8)
127
+ activesupport (= 3.1.8)
128
+ bundler (~> 1.0)
129
+ railties (= 3.1.8)
130
+ railties (3.1.8)
131
+ actionpack (= 3.1.8)
132
+ activesupport (= 3.1.8)
133
+ rack-ssl (~> 1.3.2)
134
+ rake (>= 0.8.7)
135
+ rdoc (~> 3.4)
136
+ thor (~> 0.14.6)
137
+ rake (10.0.2)
138
+ rdoc (3.12)
139
+ json (~> 1.4)
140
+ rspec (2.11.0)
141
+ rspec-core (~> 2.11.0)
142
+ rspec-expectations (~> 2.11.0)
143
+ rspec-mocks (~> 2.11.0)
144
+ rspec-core (2.11.1)
145
+ rspec-expectations (2.11.3)
146
+ diff-lcs (~> 1.1.3)
147
+ rspec-mocks (2.11.3)
148
+ rspec-rails (2.11.4)
149
+ actionpack (>= 3.0)
150
+ activesupport (>= 3.0)
151
+ railties (>= 3.0)
152
+ rspec (~> 2.11.0)
153
+ rubyzip (0.9.9)
154
+ sass (3.2.3)
155
+ sass-rails (3.1.6)
156
+ actionpack (~> 3.1.0)
157
+ railties (~> 3.1.0)
158
+ sass (>= 3.1.10)
159
+ tilt (~> 1.3.2)
160
+ selenium-webdriver (2.26.0)
161
+ childprocess (>= 0.2.5)
162
+ libwebsocket (~> 0.1.3)
163
+ multi_json (~> 1.0)
164
+ rubyzip
165
+ shoulda-matchers (1.3.0)
166
+ activesupport (>= 3.0.0)
167
+ simplecov (0.6.4)
168
+ multi_json (~> 1.0)
169
+ simplecov-html (~> 0.5.3)
170
+ simplecov-html (0.5.3)
171
+ sprockets (2.0.4)
172
+ hike (~> 1.2)
173
+ rack (~> 1.0)
174
+ tilt (~> 1.1, != 1.3.0)
175
+ sqlite3 (1.3.6)
176
+ thor (0.14.6)
177
+ tilt (1.3.3)
178
+ timecop (0.4.6)
179
+ treetop (1.4.12)
180
+ polyglot
181
+ polyglot (>= 0.3.1)
182
+ tzinfo (0.3.35)
183
+ websocket (1.0.4)
184
+ xpath (0.1.4)
185
+ nokogiri (~> 1.3)
186
+
187
+ PLATFORMS
188
+ ruby
189
+
190
+ DEPENDENCIES
191
+ aktion_test_rails!
192
+ appraisal (~> 0.5.1)
193
+ jquery-rails
194
+ rails (= 3.1.8)
195
+ sass-rails
196
+ sqlite3
@@ -0,0 +1,10 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "sqlite3", :platform=>:ruby
6
+ gem "rails", "3.2.9"
7
+ gem "jquery-rails"
8
+ gem "sass-rails"
9
+
10
+ gemspec :path=>"../"
@@ -0,0 +1,194 @@
1
+ PATH
2
+ remote: /home/chris/code/projects/aktion_test_rails
3
+ specs:
4
+ aktion_test_rails (0.0.2)
5
+ aktion_test (= 0.0.1)
6
+ capybara (~> 1.1.2)
7
+ database_cleaner (~> 0.8.0)
8
+ factory_girl_rails (~> 4.0.0)
9
+ launchy (~> 2.1.2)
10
+ poltergeist (~> 1.0.2)
11
+ rspec-rails (~> 2.11.0)
12
+ shoulda-matchers (~> 1.3.0)
13
+
14
+ GEM
15
+ remote: https://rubygems.org/
16
+ specs:
17
+ actionmailer (3.2.9)
18
+ actionpack (= 3.2.9)
19
+ mail (~> 2.4.4)
20
+ actionpack (3.2.9)
21
+ activemodel (= 3.2.9)
22
+ activesupport (= 3.2.9)
23
+ builder (~> 3.0.0)
24
+ erubis (~> 2.7.0)
25
+ journey (~> 1.0.4)
26
+ rack (~> 1.4.0)
27
+ rack-cache (~> 1.2)
28
+ rack-test (~> 0.6.1)
29
+ sprockets (~> 2.2.1)
30
+ activemodel (3.2.9)
31
+ activesupport (= 3.2.9)
32
+ builder (~> 3.0.0)
33
+ activerecord (3.2.9)
34
+ activemodel (= 3.2.9)
35
+ activesupport (= 3.2.9)
36
+ arel (~> 3.0.2)
37
+ tzinfo (~> 0.3.29)
38
+ activeresource (3.2.9)
39
+ activemodel (= 3.2.9)
40
+ activesupport (= 3.2.9)
41
+ activesupport (3.2.9)
42
+ i18n (~> 0.6)
43
+ multi_json (~> 1.0)
44
+ addressable (2.3.2)
45
+ aktion_test (0.0.1)
46
+ cucumber (~> 1.2.1)
47
+ factory_girl (~> 4.0.0)
48
+ faker (~> 1.0.1)
49
+ rspec (~> 2.11.0)
50
+ simplecov (~> 0.6.4)
51
+ timecop (~> 0.4.5)
52
+ appraisal (0.5.1)
53
+ bundler
54
+ rake
55
+ arel (3.0.2)
56
+ builder (3.0.4)
57
+ capybara (1.1.3)
58
+ mime-types (>= 1.16)
59
+ nokogiri (>= 1.3.3)
60
+ rack (>= 1.0.0)
61
+ rack-test (>= 0.5.4)
62
+ selenium-webdriver (~> 2.0)
63
+ xpath (~> 0.1.4)
64
+ childprocess (0.3.6)
65
+ ffi (~> 1.0, >= 1.0.6)
66
+ cucumber (1.2.1)
67
+ builder (>= 2.1.2)
68
+ diff-lcs (>= 1.1.3)
69
+ gherkin (~> 2.11.0)
70
+ json (>= 1.4.6)
71
+ database_cleaner (0.8.0)
72
+ diff-lcs (1.1.3)
73
+ erubis (2.7.0)
74
+ eventmachine (1.0.0)
75
+ factory_girl (4.0.0)
76
+ activesupport (>= 3.0.0)
77
+ factory_girl_rails (4.0.0)
78
+ factory_girl (~> 4.0.0)
79
+ railties (>= 3.0.0)
80
+ faker (1.0.1)
81
+ i18n (~> 0.4)
82
+ faye-websocket (0.4.6)
83
+ eventmachine (>= 0.12.0)
84
+ ffi (1.2.0)
85
+ gherkin (2.11.5)
86
+ json (>= 1.4.6)
87
+ hike (1.2.1)
88
+ http_parser.rb (0.5.3)
89
+ i18n (0.6.1)
90
+ journey (1.0.4)
91
+ jquery-rails (2.1.3)
92
+ railties (>= 3.1.0, < 5.0)
93
+ thor (~> 0.14)
94
+ json (1.7.5)
95
+ launchy (2.1.2)
96
+ addressable (~> 2.3)
97
+ libwebsocket (0.1.6.1)
98
+ websocket
99
+ mail (2.4.4)
100
+ i18n (>= 0.4.0)
101
+ mime-types (~> 1.16)
102
+ treetop (~> 1.4.8)
103
+ mime-types (1.19)
104
+ multi_json (1.3.7)
105
+ nokogiri (1.5.5)
106
+ poltergeist (1.0.2)
107
+ capybara (~> 1.1)
108
+ childprocess (~> 0.3)
109
+ faye-websocket (~> 0.4, >= 0.4.4)
110
+ http_parser.rb (~> 0.5.3)
111
+ multi_json (~> 1.0)
112
+ polyglot (0.3.3)
113
+ rack (1.4.1)
114
+ rack-cache (1.2)
115
+ rack (>= 0.4)
116
+ rack-ssl (1.3.2)
117
+ rack
118
+ rack-test (0.6.2)
119
+ rack (>= 1.0)
120
+ rails (3.2.9)
121
+ actionmailer (= 3.2.9)
122
+ actionpack (= 3.2.9)
123
+ activerecord (= 3.2.9)
124
+ activeresource (= 3.2.9)
125
+ activesupport (= 3.2.9)
126
+ bundler (~> 1.0)
127
+ railties (= 3.2.9)
128
+ railties (3.2.9)
129
+ actionpack (= 3.2.9)
130
+ activesupport (= 3.2.9)
131
+ rack-ssl (~> 1.3.2)
132
+ rake (>= 0.8.7)
133
+ rdoc (~> 3.4)
134
+ thor (>= 0.14.6, < 2.0)
135
+ rake (10.0.2)
136
+ rdoc (3.12)
137
+ json (~> 1.4)
138
+ rspec (2.11.0)
139
+ rspec-core (~> 2.11.0)
140
+ rspec-expectations (~> 2.11.0)
141
+ rspec-mocks (~> 2.11.0)
142
+ rspec-core (2.11.1)
143
+ rspec-expectations (2.11.3)
144
+ diff-lcs (~> 1.1.3)
145
+ rspec-mocks (2.11.3)
146
+ rspec-rails (2.11.4)
147
+ actionpack (>= 3.0)
148
+ activesupport (>= 3.0)
149
+ railties (>= 3.0)
150
+ rspec (~> 2.11.0)
151
+ rubyzip (0.9.9)
152
+ sass (3.2.3)
153
+ sass-rails (3.2.5)
154
+ railties (~> 3.2.0)
155
+ sass (>= 3.1.10)
156
+ tilt (~> 1.3)
157
+ selenium-webdriver (2.26.0)
158
+ childprocess (>= 0.2.5)
159
+ libwebsocket (~> 0.1.3)
160
+ multi_json (~> 1.0)
161
+ rubyzip
162
+ shoulda-matchers (1.3.0)
163
+ activesupport (>= 3.0.0)
164
+ simplecov (0.6.4)
165
+ multi_json (~> 1.0)
166
+ simplecov-html (~> 0.5.3)
167
+ simplecov-html (0.5.3)
168
+ sprockets (2.2.1)
169
+ hike (~> 1.2)
170
+ multi_json (~> 1.0)
171
+ rack (~> 1.0)
172
+ tilt (~> 1.1, != 1.3.0)
173
+ sqlite3 (1.3.6)
174
+ thor (0.16.0)
175
+ tilt (1.3.3)
176
+ timecop (0.4.6)
177
+ treetop (1.4.12)
178
+ polyglot
179
+ polyglot (>= 0.3.1)
180
+ tzinfo (0.3.35)
181
+ websocket (1.0.4)
182
+ xpath (0.1.4)
183
+ nokogiri (~> 1.3)
184
+
185
+ PLATFORMS
186
+ ruby
187
+
188
+ DEPENDENCIES
189
+ aktion_test_rails!
190
+ appraisal (~> 0.5.1)
191
+ jquery-rails
192
+ rails (= 3.2.9)
193
+ sass-rails
194
+ sqlite3
@@ -0,0 +1,29 @@
1
+ module AktionTestRails
2
+ module ClassBuilder
3
+ def self.included(example_group)
4
+ example_group.class_eval do
5
+ after do
6
+ teardown_defined_constants
7
+ end
8
+ end
9
+ end
10
+
11
+ def define_class(class_name, base = Object, &block)
12
+ class_name = class_name.to_s.camelize
13
+
14
+ Class.new(base).tap do |constant_class|
15
+ Object.const_set(class_name, constant_class)
16
+ constant_class.unloadable
17
+ constant_class.class_eval(&block) if block_given?
18
+ constant_class.reset_column_information if constant_class.respond_to? :reset_column_information
19
+ end
20
+ end
21
+
22
+ def teardown_defined_constants
23
+ ActiveSupport::Dependencies.clear
24
+ end
25
+ end
26
+ end
27
+
28
+ RSpec.configure {|config| config.include AktionTestRails::ClassBuilder}
29
+
@@ -0,0 +1,49 @@
1
+ module AktionTestRails
2
+ module Matchers
3
+ module FactoryGirl
4
+ def have_a_valid_factory(factory_name)
5
+ ValidFactoryMatcher.new(factory_name)
6
+ end
7
+
8
+ class ValidFactoryMatcher
9
+ def initialize(factory_name)
10
+ @factory_name = factory_name
11
+ end
12
+
13
+ def matches?(subject)
14
+ factory_exists? && factory_creates_valid_record?
15
+ end
16
+
17
+ def failure_message
18
+ message = "Expected :#{@factory_name} to be a valid factory."
19
+ if factory_exists?
20
+ if @record.errors.full_messages.any?
21
+ message << "\n Failed Validations:"
22
+ @record.errors.full_messages.each do |error|
23
+ message << "\n #{error}"
24
+ end
25
+ end
26
+ else
27
+ message << "\n No factory by the name :#{@factory_name} found"
28
+ end
29
+ message
30
+ end
31
+
32
+ def description
33
+ "has a valid factory named :#{@factory_name}"
34
+ end
35
+
36
+ protected
37
+
38
+ def factory_exists?
39
+ ::FactoryGirl.factories.registered?(@factory_name)
40
+ end
41
+
42
+ def factory_creates_valid_record?
43
+ @record = ::FactoryGirl.build(@factory_name)
44
+ @record.valid?
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,16 @@
1
+ require 'aktion_test_rails/matchers/factory_girl/have_a_valid_factory'
2
+
3
+ module AktionTestRails
4
+ module Matchers
5
+ # = Matchers for FactoryGirl factories
6
+ #
7
+ # These methods will test that factories are producing valid records
8
+ #
9
+ # describe User do
10
+ # it { should have_a_valid_factory(:user) }
11
+ # end
12
+ #
13
+ module FactoryGirl
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,9 @@
1
+ if defined?(::ActiveRecord)
2
+ if defined?(::FactoryGirl)
3
+ require 'aktion_test_rails/matchers/factory_girl'
4
+
5
+ module RSpec::Matchers
6
+ include AktionTestRails::Matchers::FactoryGirl
7
+ end
8
+ end
9
+ end
@@ -0,0 +1 @@
1
+ require 'aktion_test_rails/matchers/integrations/rspec'
@@ -0,0 +1,70 @@
1
+ module AktionTestRails
2
+ module ModelBuilder
3
+ def self.included(example_group)
4
+ example_group.class_eval do
5
+ before do
6
+ @created_tables ||= []
7
+ end
8
+
9
+ after do
10
+ drop_created_tables
11
+ end
12
+ end
13
+ end
14
+
15
+ def create_table(table_name, options = {}, &block)
16
+ connection = ActiveRecord::Base.connection
17
+
18
+ begin
19
+ connection.execute("DROP TABLE IF EXISTS #{table_name}")
20
+ connection.create_table(table_name, options, &block)
21
+ @created_tables << table_name
22
+ connection
23
+ rescue Exception => e
24
+ connection.execute("DROP TABLE IF EXISTS #{table_name}")
25
+ raise e
26
+ end
27
+ end
28
+
29
+ def define_model_class(class_name, &block)
30
+ define_class(class_name, ActiveRecord::Base, &block)
31
+ end
32
+
33
+ def define_active_model_class(class_name, options = {}, &block)
34
+ define_class(class_name) do
35
+ include ActiveModel::Validations
36
+
37
+ options[:accessors].each do |column|
38
+ attr_accessor column.to_sym
39
+ end
40
+
41
+ class_eval(&block) if block_given?
42
+ end
43
+ end
44
+
45
+ def define_model(name, columns = {}, &block)
46
+ class_name = name.to_s.pluralize.classify
47
+ table_name = class_name.tableize
48
+
49
+ create_table(table_name) do |table|
50
+ columns.each do |name,type|
51
+ table.column name, type
52
+ end
53
+ end
54
+
55
+ define_model_class(class_name, &block)
56
+ end
57
+
58
+ def drop_created_tables
59
+ connection = ActiveRecord::Base.connection
60
+
61
+ @created_tables.each do |table_name|
62
+ connection.execute("DROP TABLE IF EXISTS #{table_name}")
63
+ end
64
+ end
65
+ end
66
+ end
67
+
68
+ RSpec.configure do |config|
69
+ config.include AktionTestRails::ModelBuilder
70
+ end
@@ -1,3 +1,3 @@
1
1
  module AktionTestRails
2
- VERSION = "0.0.2"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -1,8 +1,5 @@
1
- require "aktion_test_rails/version"
2
1
  require 'factory_girl_rails'
3
2
  require 'faker'
4
3
  require 'shoulda-matchers'
5
-
6
- module AktionTestRails
7
- # Your code goes here...
8
- end
4
+ require "aktion_test_rails/version"
5
+ require 'aktion_test_rails/matchers'
@@ -0,0 +1,64 @@
1
+ require 'spec_helper'
2
+
3
+ describe AktionTestRails::Matchers::FactoryGirl::ValidFactoryMatcher do
4
+ let(:matcher_class) { AktionTestRails::Matchers::FactoryGirl::ValidFactoryMatcher }
5
+
6
+ after(:each) do
7
+ FactoryGirl.factories.clear
8
+ end
9
+
10
+ it "accepts a valid factory" do
11
+ define_model :user, :name => :string
12
+ FactoryGirl.define do
13
+ factory :user do
14
+ name "Name"
15
+ end
16
+ end
17
+
18
+ User.new.should have_a_valid_factory(:user)
19
+ end
20
+
21
+ context "when the factory does not exist" do
22
+ before(:each) { define_model :user }
23
+
24
+ it "does not accept the factory" do
25
+ User.new.should_not have_a_valid_factory(:user)
26
+ end
27
+
28
+ it "says that the factory does not exist" do
29
+ matcher = matcher_class.new(:user).tap{|m| m.matches?(User.new)}
30
+ expected_message = <<-ERROR
31
+ Expected :user to be a valid factory.
32
+ No factory by the name :user found
33
+ ERROR
34
+ matcher.failure_message.should == expected_message.strip
35
+ end
36
+ end
37
+
38
+ context 'when the factory has validation errors' do
39
+ before(:each) do
40
+ define_model :user, :name => :string do
41
+ validates_presence_of :name
42
+ end
43
+ FactoryGirl.define do
44
+ factory :user do
45
+ name nil
46
+ end
47
+ end
48
+ end
49
+
50
+ it "does not accept the factory" do
51
+ User.new.should_not have_a_valid_factory(:user)
52
+ end
53
+
54
+ it "should detail validation errors with the factory" do
55
+ matcher = matcher_class.new(:user).tap{|m| m.matches?(User.new)}
56
+ expected_message = <<-ERROR
57
+ Expected :user to be a valid factory.
58
+ Failed Validations:
59
+ Name can't be blank
60
+ ERROR
61
+ matcher.failure_message.should == expected_message.strip
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,27 @@
1
+ TESTAPP_ROOT = File.join(File.dirname(__FILE__), '..', 'tmp', 'testapp')
2
+ FileUtils.rm_rf(TESTAPP_ROOT) if File.exists?(TESTAPP_ROOT)
3
+ `rails new #{TESTAPP_ROOT}`
4
+
5
+ ENV['RAILS_ENV'] = 'test'
6
+ ENV['BUNDLE_GEMFILE'] ||= "#{TESTAPP_ROOT}/Gemfile"
7
+
8
+ require "#{TESTAPP_ROOT}/config/environment"
9
+ require 'aktion_test_rails'
10
+ require 'aktion_test_rails/class_builder'
11
+ require 'aktion_test_rails/model_builder'
12
+
13
+ PROJECT_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')).freeze
14
+
15
+ $LOAD_PATH << File.join(PROJECT_ROOT, 'lib')
16
+
17
+ Dir[File.join(File.dirname(__FILE__), 'support', '**', '*.rb')].each{|file| require file}
18
+
19
+
20
+ ActiveRecord::Migration.verbose = false
21
+ ActiveRecord::Migrator.migrate("#{Rails.root}/db/migrate")
22
+
23
+ RSpec.configure do |config|
24
+ config.treat_symbols_as_metadata_keys_with_true_values = true
25
+ config.run_all_when_everything_filtered = true
26
+ config.order = 'random'
27
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aktion_test_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-23 00:00:00.000000000 Z
12
+ date: 2012-11-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aktion_test
@@ -44,13 +44,13 @@ dependencies:
44
44
  - !ruby/object:Gem::Version
45
45
  version: 2.11.0
46
46
  - !ruby/object:Gem::Dependency
47
- name: cucumber-rails
47
+ name: factory_girl_rails
48
48
  requirement: !ruby/object:Gem::Requirement
49
49
  none: false
50
50
  requirements:
51
51
  - - ~>
52
52
  - !ruby/object:Gem::Version
53
- version: 1.3.0
53
+ version: 4.0.0
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
@@ -58,15 +58,15 @@ dependencies:
58
58
  requirements:
59
59
  - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: 1.3.0
61
+ version: 4.0.0
62
62
  - !ruby/object:Gem::Dependency
63
- name: factory_girl_rails
63
+ name: database_cleaner
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  none: false
66
66
  requirements:
67
67
  - - ~>
68
68
  - !ruby/object:Gem::Version
69
- version: 4.0.0
69
+ version: 0.8.0
70
70
  type: :runtime
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
@@ -74,15 +74,15 @@ dependencies:
74
74
  requirements:
75
75
  - - ~>
76
76
  - !ruby/object:Gem::Version
77
- version: 4.0.0
77
+ version: 0.8.0
78
78
  - !ruby/object:Gem::Dependency
79
- name: database_cleaner
79
+ name: capybara
80
80
  requirement: !ruby/object:Gem::Requirement
81
81
  none: false
82
82
  requirements:
83
83
  - - ~>
84
84
  - !ruby/object:Gem::Version
85
- version: 0.8.0
85
+ version: 1.1.2
86
86
  type: :runtime
87
87
  prerelease: false
88
88
  version_requirements: !ruby/object:Gem::Requirement
@@ -90,15 +90,15 @@ dependencies:
90
90
  requirements:
91
91
  - - ~>
92
92
  - !ruby/object:Gem::Version
93
- version: 0.8.0
93
+ version: 1.1.2
94
94
  - !ruby/object:Gem::Dependency
95
- name: email_spec
95
+ name: poltergeist
96
96
  requirement: !ruby/object:Gem::Requirement
97
97
  none: false
98
98
  requirements:
99
99
  - - ~>
100
100
  - !ruby/object:Gem::Version
101
- version: 1.2.1
101
+ version: 1.0.2
102
102
  type: :runtime
103
103
  prerelease: false
104
104
  version_requirements: !ruby/object:Gem::Requirement
@@ -106,15 +106,15 @@ dependencies:
106
106
  requirements:
107
107
  - - ~>
108
108
  - !ruby/object:Gem::Version
109
- version: 1.2.1
109
+ version: 1.0.2
110
110
  - !ruby/object:Gem::Dependency
111
- name: capybara
111
+ name: launchy
112
112
  requirement: !ruby/object:Gem::Requirement
113
113
  none: false
114
114
  requirements:
115
115
  - - ~>
116
116
  - !ruby/object:Gem::Version
117
- version: 1.1.2
117
+ version: 2.1.2
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
@@ -122,15 +122,15 @@ dependencies:
122
122
  requirements:
123
123
  - - ~>
124
124
  - !ruby/object:Gem::Version
125
- version: 1.1.2
125
+ version: 2.1.2
126
126
  - !ruby/object:Gem::Dependency
127
- name: capybara-webkit
127
+ name: shoulda-matchers
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  none: false
130
130
  requirements:
131
131
  - - ~>
132
132
  - !ruby/object:Gem::Version
133
- version: 0.12.1
133
+ version: 1.3.0
134
134
  type: :runtime
135
135
  prerelease: false
136
136
  version_requirements: !ruby/object:Gem::Requirement
@@ -138,39 +138,39 @@ dependencies:
138
138
  requirements:
139
139
  - - ~>
140
140
  - !ruby/object:Gem::Version
141
- version: 0.12.1
141
+ version: 1.3.0
142
142
  - !ruby/object:Gem::Dependency
143
- name: launchy
143
+ name: appraisal
144
144
  requirement: !ruby/object:Gem::Requirement
145
145
  none: false
146
146
  requirements:
147
147
  - - ~>
148
148
  - !ruby/object:Gem::Version
149
- version: 2.1.2
150
- type: :runtime
149
+ version: 0.5.1
150
+ type: :development
151
151
  prerelease: false
152
152
  version_requirements: !ruby/object:Gem::Requirement
153
153
  none: false
154
154
  requirements:
155
155
  - - ~>
156
156
  - !ruby/object:Gem::Version
157
- version: 2.1.2
157
+ version: 0.5.1
158
158
  - !ruby/object:Gem::Dependency
159
- name: shoulda-matchers
159
+ name: rails
160
160
  requirement: !ruby/object:Gem::Requirement
161
161
  none: false
162
162
  requirements:
163
163
  - - ~>
164
164
  - !ruby/object:Gem::Version
165
- version: 1.3.0
166
- type: :runtime
165
+ version: '3.0'
166
+ type: :development
167
167
  prerelease: false
168
168
  version_requirements: !ruby/object:Gem::Requirement
169
169
  none: false
170
170
  requirements:
171
171
  - - ~>
172
172
  - !ruby/object:Gem::Version
173
- version: 1.3.0
173
+ version: '3.0'
174
174
  description: Subproject of aktion_test, adding rails versions of gems, libraries and
175
175
  rake tasks.
176
176
  email:
@@ -180,14 +180,31 @@ extensions: []
180
180
  extra_rdoc_files: []
181
181
  files:
182
182
  - .gitignore
183
+ - .rspec
183
184
  - .rvmrc
185
+ - .travis.yml
186
+ - Appraisals
184
187
  - Gemfile
185
188
  - LICENSE
186
189
  - README.md
187
190
  - Rakefile
188
191
  - aktion_test_rails.gemspec
192
+ - gemfiles/3.0.gemfile
193
+ - gemfiles/3.0.gemfile.lock
194
+ - gemfiles/3.1.gemfile
195
+ - gemfiles/3.1.gemfile.lock
196
+ - gemfiles/3.2.gemfile
197
+ - gemfiles/3.2.gemfile.lock
189
198
  - lib/aktion_test_rails.rb
199
+ - lib/aktion_test_rails/class_builder.rb
200
+ - lib/aktion_test_rails/matchers.rb
201
+ - lib/aktion_test_rails/matchers/factory_girl.rb
202
+ - lib/aktion_test_rails/matchers/factory_girl/have_a_valid_factory.rb
203
+ - lib/aktion_test_rails/matchers/integrations/rspec.rb
204
+ - lib/aktion_test_rails/model_builder.rb
190
205
  - lib/aktion_test_rails/version.rb
206
+ - spec/matchers/factory_girl/have_a_valid_factory_spec.rb
207
+ - spec/spec_helper.rb
191
208
  homepage: http://aktionlab.com
192
209
  licenses: []
193
210
  post_install_message:
@@ -202,7 +219,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
202
219
  version: '0'
203
220
  segments:
204
221
  - 0
205
- hash: 998795187
222
+ hash: 4023877998039094989
206
223
  required_rubygems_version: !ruby/object:Gem::Requirement
207
224
  none: false
208
225
  requirements:
@@ -211,11 +228,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
211
228
  version: '0'
212
229
  segments:
213
230
  - 0
214
- hash: 998795187
231
+ hash: 4023877998039094989
215
232
  requirements: []
216
233
  rubyforge_project:
217
234
  rubygems_version: 1.8.24
218
235
  signing_key:
219
236
  specification_version: 3
220
237
  summary: Rails testing setup
221
- test_files: []
238
+ test_files:
239
+ - spec/matchers/factory_girl/have_a_valid_factory_spec.rb
240
+ - spec/spec_helper.rb