spreewald 0.9.5 → 0.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +36 -11
- data/lib/spreewald/web_steps.rb +4 -1
- data/lib/spreewald_support/version.rb +1 -1
- data/tests/rails-2.3/Gemfile.lock +1 -1
- data/tests/rails-3.2/capybara-1/Gemfile.lock +1 -1
- data/tests/rails-3.2/capybara-2/Gemfile.lock +1 -1
- data/tests/shared/features/shared/web_steps.feature +0 -9
- metadata +6 -7
data/Rakefile
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
require "bundler/gem_tasks"
|
|
3
3
|
|
|
4
4
|
desc 'Default: Run all tests.'
|
|
5
|
-
task :default => 'all:
|
|
5
|
+
task :default => 'all:rubies'
|
|
6
6
|
|
|
7
7
|
desc 'Update the "Steps" section of the README'
|
|
8
8
|
task :update_readme do
|
|
@@ -35,18 +35,17 @@ namespace :all do
|
|
|
35
35
|
|
|
36
36
|
desc 'Run tests on several Ruby versions'
|
|
37
37
|
task :rubies do
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
end
|
|
38
|
+
success = case
|
|
39
|
+
when system('which rvm')
|
|
40
|
+
run_for_all_rubies :rvm
|
|
41
|
+
when system('which rbenv') && `rbenv commands`.split("\n").include?('alias')
|
|
42
|
+
# rbenv currently works only with the alias plugin, as we do not want to
|
|
43
|
+
# specify Ruby versions down to their patch levels.
|
|
44
|
+
run_for_all_rubies :rbenv
|
|
46
45
|
else
|
|
47
|
-
fail 'Currently only
|
|
46
|
+
fail 'Currently only RVM and rbenv (with alias plugin) are supported. Open Rakefile and add your Ruby version manager!'
|
|
48
47
|
end
|
|
49
|
-
|
|
48
|
+
|
|
50
49
|
fail "Tests failed" unless success
|
|
51
50
|
end
|
|
52
51
|
|
|
@@ -61,6 +60,32 @@ namespace :all do
|
|
|
61
60
|
|
|
62
61
|
end
|
|
63
62
|
|
|
63
|
+
def run_for_all_rubies(version_manager)
|
|
64
|
+
%w[
|
|
65
|
+
1.8.7
|
|
66
|
+
1.9.3
|
|
67
|
+
2.0.0
|
|
68
|
+
].all? do |ruby_version|
|
|
69
|
+
announce "Running features for Ruby #{ruby_version}", 2
|
|
70
|
+
|
|
71
|
+
execute = case version_manager
|
|
72
|
+
when :rvm
|
|
73
|
+
"rvm #{ruby_version} do"
|
|
74
|
+
when :rbenv
|
|
75
|
+
ENV['RBENV_VERSION'] = ruby_version
|
|
76
|
+
'rbenv exec'
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
current_version = `#{execute} ruby -v`.match(/^ruby (\d\.\d\.\d)/)[1]
|
|
80
|
+
if current_version == ruby_version
|
|
81
|
+
puts "Currently active Ruby is #{current_version}"
|
|
82
|
+
system "#{execute} rake all:bundle all:features"
|
|
83
|
+
else
|
|
84
|
+
fail "Failed to set Ruby #{ruby_version} (#{current_version} active!)"
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
64
89
|
def for_each_directory_of(path, &block)
|
|
65
90
|
Dir[path].sort.each do |rakefile|
|
|
66
91
|
directory = File.dirname(rakefile)
|
data/lib/spreewald/web_steps.rb
CHANGED
|
@@ -619,7 +619,10 @@ end
|
|
|
619
619
|
# More details [here](https://makandracards.com/makandra/12139-waiting-for-page-loads-and-ajax-requests-to-finish-with-capybara).
|
|
620
620
|
When /^I wait for the page to load$/ do
|
|
621
621
|
if [:selenium, :webkit, :poltergeist].include?(Capybara.current_driver)
|
|
622
|
-
|
|
622
|
+
patiently do
|
|
623
|
+
# when no jQuery is loaded, we assume there are no pending AJAX requests
|
|
624
|
+
page.evaluate_script("typeof jQuery === 'undefined' || $.active == 0").should be_true
|
|
625
|
+
end
|
|
623
626
|
end
|
|
624
627
|
page.has_content? ''
|
|
625
628
|
end
|
|
@@ -45,12 +45,3 @@ Feature: Web steps
|
|
|
45
45
|
|
|
46
46
|
When I go back
|
|
47
47
|
Then I should be on "/static_pages/link_to_home"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
@javascript
|
|
51
|
-
Scenario: /^I go back$/
|
|
52
|
-
Given I go to "/static_pages/link_to_home"
|
|
53
|
-
And I follow "Home"
|
|
54
|
-
|
|
55
|
-
When I go back
|
|
56
|
-
Then I should be on "/static_pages/link_to_home"
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spreewald
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 55
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 9
|
|
9
|
-
-
|
|
10
|
-
version: 0.9.
|
|
9
|
+
- 6
|
|
10
|
+
version: 0.9.6
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Tobias Kraze
|
|
@@ -15,8 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2014-
|
|
19
|
-
default_executable:
|
|
18
|
+
date: 2014-04-14 00:00:00 Z
|
|
20
19
|
dependencies:
|
|
21
20
|
- !ruby/object:Gem::Dependency
|
|
22
21
|
name: cucumber-rails
|
|
@@ -150,7 +149,6 @@ files:
|
|
|
150
149
|
- tests/shared/features/shared/table_steps.feature
|
|
151
150
|
- tests/shared/features/shared/web_steps.feature
|
|
152
151
|
- tests/shared/features/support/paths.rb
|
|
153
|
-
has_rdoc: true
|
|
154
152
|
homepage: https://github.com/makandra/spreewald
|
|
155
153
|
licenses:
|
|
156
154
|
- MIT
|
|
@@ -180,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
180
178
|
requirements: []
|
|
181
179
|
|
|
182
180
|
rubyforge_project:
|
|
183
|
-
rubygems_version: 1.
|
|
181
|
+
rubygems_version: 1.8.24
|
|
184
182
|
signing_key:
|
|
185
183
|
specification_version: 3
|
|
186
184
|
summary: Collection of useful cucumber steps.
|
|
@@ -242,3 +240,4 @@ test_files:
|
|
|
242
240
|
- tests/shared/features/shared/table_steps.feature
|
|
243
241
|
- tests/shared/features/shared/web_steps.feature
|
|
244
242
|
- tests/shared/features/support/paths.rb
|
|
243
|
+
has_rdoc:
|