squash 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +0 -1
- data/.rvmrc +1 -0
- data/Gemfile.lock +1 -1
- data/README.markdown +3 -1
- data/Rakefile +0 -7
- data/features/run_empty_scaffold_application.feature +8 -0
- data/features/support/env.rb +10 -0
- data/lib/squash/version.rb +1 -1
- data/squash.gemspec +12 -10
- data/template/.rvmrc +7 -0
- data/template/Gemfile +1 -2
- data/template/features/example.feature +9 -0
- data/template/self_test.feature +10 -0
- data/{lib/squash → template/step_definitions}/web_steps.rb +4 -4
- data/template/support/env.rb +8 -1
- data/template/support/paths.rb +7 -5
- metadata +12 -11
- data/lib/squash.rb +0 -10
- data/template/features/smoke_test.feature +0 -11
- data/template/step_definitions/example_steps.rb +0 -2
data/.gitignore
CHANGED
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm use 1.9.2@squash_development
|
data/Gemfile.lock
CHANGED
data/README.markdown
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
# Squash
|
2
2
|
|
3
|
-
A
|
3
|
+
A generator of Squashes
|
4
4
|
|
5
5
|
## Description
|
6
6
|
|
7
|
+
This gem generates scaffold for Squashes - stand-alone Cucumber applications to test web apps.
|
8
|
+
|
7
9
|
I spent a huge amount of time building Cucumber-based stacks to test my web applications. There are so many options, and sometimes they don't really get together. Should I use Cucumber/RSpec/Webrat/Mechanize, Cucumber/RSpec/Capybara/Selenium, Cucumber/Watir, or what else? How do I solve all the version conflicts that seem to spring out of nowhere when I put these libraries together? How do I wire up all the pieces in a stand-alone, non-Rails application?
|
8
10
|
|
9
11
|
Squash tries to save some time by generating a Cucumber-powered, Bundler-enabled web test application that is fully wired with the current popular favorite mix of gems: Cucumber, RSpec, Capybara and Akephalos. Once you've generated the Squash application, you can write your own features to
|
data/Rakefile
CHANGED
@@ -5,13 +5,6 @@ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
|
5
5
|
require 'squash/version'
|
6
6
|
|
7
7
|
namespace :gem do
|
8
|
-
desc "Install the current version as a local gem"
|
9
|
-
task :install do
|
10
|
-
system "gem build squash.gemspec"
|
11
|
-
system "gem install squash-#{Squash::VERSION}.gem"
|
12
|
-
File.delete "squash-#{Squash::VERSION}.gem"
|
13
|
-
end
|
14
|
-
|
15
8
|
desc "Publish the current version to the world"
|
16
9
|
task :publish do
|
17
10
|
system "bundle exec cucumber -q"
|
@@ -8,5 +8,13 @@ Given I'm in an empty directory
|
|
8
8
|
When I run "bundle exec squash clickmonkey"
|
9
9
|
And I cd to "clickmonkey"
|
10
10
|
And I run "bundle install"
|
11
|
+
And I run "bundle exec rake self_test"
|
12
|
+
Then the output should contain "1 scenario (1 passed)"
|
13
|
+
|
14
|
+
Scenario: Run example
|
15
|
+
Given I'm in an empty directory
|
16
|
+
When I run "bundle exec squash clickmonkey"
|
17
|
+
And I cd to "clickmonkey"
|
18
|
+
And I run "bundle install"
|
11
19
|
And I run "bundle exec cucumber"
|
12
20
|
Then the output should contain "1 scenario (1 passed)"
|
data/features/support/env.rb
CHANGED
@@ -2,3 +2,13 @@ require 'rubygems'
|
|
2
2
|
require 'bundler/setup'
|
3
3
|
|
4
4
|
require 'aruba/cucumber'
|
5
|
+
|
6
|
+
Before do
|
7
|
+
system "rvm gemset create tmp"
|
8
|
+
system "rvm gemset use tmp"
|
9
|
+
end
|
10
|
+
|
11
|
+
After do
|
12
|
+
system "rvm --force gemset delete tmp"
|
13
|
+
system "rvm gemset use squash_development"
|
14
|
+
end
|
data/lib/squash/version.rb
CHANGED
data/squash.gemspec
CHANGED
@@ -5,8 +5,8 @@ Gem::Specification.new do |s|
|
|
5
5
|
s.name = 'squash'
|
6
6
|
s.version = Squash::VERSION
|
7
7
|
s.authors = ['Paolo "Nusco" Perrotta']
|
8
|
-
s.description = '
|
9
|
-
s.summary =
|
8
|
+
s.description = 'This gem generates scaffold for Squashes - stand-alone Cucumber applications to test web apps. See (link)'
|
9
|
+
s.summary = 'A generator of Squashes'
|
10
10
|
s.require_path = "lib"
|
11
11
|
s.email = 'paolo.nusco.perrotta@gmail.com'
|
12
12
|
s.homepage = 'https://github.com/nusco/squash'
|
@@ -15,17 +15,19 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.files = `git ls-files`.split("\n")
|
16
16
|
s.rubygems_version = "1.3.7"
|
17
17
|
|
18
|
-
s.add_dependency 'cucumber'
|
19
|
-
s.add_dependency 'rspec'
|
20
|
-
# s.add_dependency 'capybara' # at the moment, version conflict with the capybara required by akephalos
|
21
|
-
s.add_dependency 'akephalos'
|
22
|
-
s.add_dependency 'syntax' # Colored sintax in Cucumber's HTML output
|
23
|
-
|
24
18
|
s.rubyforge_project = "nowarning" # FIXME: any way around this?
|
25
19
|
|
26
|
-
|
27
|
-
|
20
|
+
s.add_dependency 'cucumber'
|
21
|
+
s.add_dependency 'rspec'
|
22
|
+
# s.add_dependency 'capybara' # at the moment, version conflict with the capybara required by akephalos
|
23
|
+
s.add_dependency 'akephalos'
|
24
|
+
s.add_dependency 'syntax' # Colored sintax in Cucumber's HTML output
|
25
|
+
|
26
|
+
s.rubyforge_project = "nowarning" # FIXME: any way around this?
|
28
27
|
|
28
|
+
s.add_development_dependency 'rake'
|
29
|
+
s.add_development_dependency 'aruba'
|
30
|
+
|
29
31
|
# s.test_files = `git ls-files -- {spec,features}/*`.split("\n")
|
30
32
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
31
33
|
s.extra_rdoc_files = ["LICENSE", "README.markdown"]
|
data/template/.rvmrc
ADDED
data/template/Gemfile
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
source :rubygems
|
2
2
|
|
3
|
-
gem 'squash' , '= 0.0.4'
|
4
|
-
|
5
3
|
gem 'cucumber' , '~> 0.10.0'
|
6
4
|
gem 'rspec' , '~> 2.3.0'
|
7
5
|
#gem 'capybara' , '~> 0.4.0' # at the moment, version conflict with the capybara required by akephalos
|
8
6
|
gem 'akephalos' , '~> 0.2.4'
|
7
|
+
|
9
8
|
gem 'syntax' , '~> 1.0.0' # Colored sintax in Cucumber's HTML output
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Feature: Self test
|
2
|
+
As a developer
|
3
|
+
I want to check that all the gems in the Squash stack play nice together
|
4
|
+
So that I can verify that the entire stack works even after updating my bundle
|
5
|
+
|
6
|
+
Scenario: Go to the web and click around a bit
|
7
|
+
Given I am on http://www.rubygems.org
|
8
|
+
When I fill in "query" with "squash"
|
9
|
+
And I press "Search"
|
10
|
+
Then I should see "test"
|
@@ -1,9 +1,9 @@
|
|
1
|
-
Given /^(?:|I )am on (.+)$/ do |
|
2
|
-
visit path_to(
|
1
|
+
Given /^(?:|I )am on (.+)$/ do |page|
|
2
|
+
visit path_to(page)
|
3
3
|
end
|
4
4
|
|
5
|
-
When /^(?:|I )go to (.+)$/ do |
|
6
|
-
visit path_to(
|
5
|
+
When /^(?:|I )go to (.+)$/ do |page|
|
6
|
+
visit path_to(page)
|
7
7
|
end
|
8
8
|
|
9
9
|
When /^(?:|I )fill in "([^\"]*)" with "([^\"]*)"$/ do |field, value|
|
data/template/support/env.rb
CHANGED
data/template/support/paths.rb
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
module NavigationHelpers
|
2
|
-
def path_to(
|
3
|
-
|
2
|
+
def path_to(page)
|
3
|
+
return page if page.start_with?('http://')
|
4
|
+
|
5
|
+
case page
|
4
6
|
|
5
|
-
when /
|
6
|
-
'http://www.
|
7
|
+
when /Wikipedia/
|
8
|
+
'http://www.wikipedia.org/'
|
7
9
|
|
8
10
|
else
|
9
|
-
raise "Can't find mapping from \"#{
|
11
|
+
raise "Can't find mapping from \"#{page}\" to a path.\n" +
|
10
12
|
"Now, go and add a mapping in #{__FILE__}"
|
11
13
|
end
|
12
14
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 5
|
9
|
+
version: 0.0.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Paolo "Nusco" Perrotta
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date:
|
17
|
+
date: 2011-01-05 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -95,7 +95,7 @@ dependencies:
|
|
95
95
|
type: :development
|
96
96
|
prerelease: false
|
97
97
|
version_requirements: *id006
|
98
|
-
description:
|
98
|
+
description: This gem generates scaffold for Squashes - stand-alone Cucumber applications to test web apps. See (link)
|
99
99
|
email: paolo.nusco.perrotta@gmail.com
|
100
100
|
executables:
|
101
101
|
- squash
|
@@ -106,6 +106,7 @@ extra_rdoc_files:
|
|
106
106
|
- README.markdown
|
107
107
|
files:
|
108
108
|
- .gitignore
|
109
|
+
- .rvmrc
|
109
110
|
- Gemfile
|
110
111
|
- Gemfile.lock
|
111
112
|
- LICENSE
|
@@ -116,14 +117,14 @@ files:
|
|
116
117
|
- features/run_empty_scaffold_application.feature
|
117
118
|
- features/step_definitions/squash_steps.rb
|
118
119
|
- features/support/env.rb
|
119
|
-
- lib/squash.rb
|
120
120
|
- lib/squash/version.rb
|
121
|
-
- lib/squash/web_steps.rb
|
122
121
|
- squash.gemspec
|
122
|
+
- template/.rvmrc
|
123
123
|
- template/Gemfile
|
124
124
|
- template/cucumber.yaml
|
125
|
-
- template/features/
|
126
|
-
- template/
|
125
|
+
- template/features/example.feature
|
126
|
+
- template/self_test.feature
|
127
|
+
- template/step_definitions/web_steps.rb
|
127
128
|
- template/support/env.rb
|
128
129
|
- template/support/paths.rb
|
129
130
|
has_rdoc: true
|
@@ -140,7 +141,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
140
141
|
requirements:
|
141
142
|
- - ">="
|
142
143
|
- !ruby/object:Gem::Version
|
143
|
-
hash:
|
144
|
+
hash: -3445518033253357239
|
144
145
|
segments:
|
145
146
|
- 0
|
146
147
|
version: "0"
|
@@ -149,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
150
|
requirements:
|
150
151
|
- - ">="
|
151
152
|
- !ruby/object:Gem::Version
|
152
|
-
hash:
|
153
|
+
hash: -3445518033253357239
|
153
154
|
segments:
|
154
155
|
- 0
|
155
156
|
version: "0"
|
@@ -159,6 +160,6 @@ rubyforge_project: nowarning
|
|
159
160
|
rubygems_version: 1.3.7
|
160
161
|
signing_key:
|
161
162
|
specification_version: 3
|
162
|
-
summary:
|
163
|
+
summary: A generator of Squashes
|
163
164
|
test_files: []
|
164
165
|
|
data/lib/squash.rb
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
Feature: This is a smoke test
|
2
|
-
As a developer
|
3
|
-
I want to run a smoke-test scenario in this brand new Squash app
|
4
|
-
So that I can verify that the entire stack works
|
5
|
-
|
6
|
-
Scenario: Search on RubyGems
|
7
|
-
Given I'm new to Squash
|
8
|
-
And I go to RubyGems.org
|
9
|
-
And I fill in "query" with "squash"
|
10
|
-
And I press "Search"
|
11
|
-
Then I should see "A test application framework"
|