rwebspec 1.4.0 → 1.4.0.1

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/README CHANGED
@@ -1,33 +1,33 @@
1
-
2
- rWebUnit wraps the popular web testing framework WATIR with RSpec Syntax to provide better easy to read automated web test cases. By using iTest/Watir recorder, the rWebUnit test scripts can be recorded in Firefox. iTest2 makes editing/executing test cases with ease.
3
-
4
- Sample rWebUnit Test:
5
-
6
- require 'rwebspec'
7
-
8
- spec "Locate a Suncorp Branch" do
9
- include RWebSpec::RSpecHelper
10
-
11
- before(:all) do
12
- open_browser_with("http://suncorp.com.au/")
13
- end
14
-
15
- before(:each) do
16
- goto_page("/locator")
17
- end
18
-
19
- after(:all) do
20
- close_browser
21
- end
22
-
23
- scenario "Find by extended trading hours" do
24
- checkbox(:id, "OpenExtendedTradingHoursSerivceId").click # using Watir directly
25
- enter_text("Postcode_Locator__Postcode", "4061")
26
- click_button_with_image("search_button.gif")
27
- page_source.should include("Queen St Mall")
28
- end
29
- end
30
-
31
-
32
- iTest2 Homepage: http://www.itest2.com
1
+
2
+ rWebUnit wraps the popular web testing framework WATIR with RSpec Syntax to provide better easy to read automated web test cases. By using iTest/Watir recorder, the rWebUnit test scripts can be recorded in Firefox. iTest2 makes editing/executing test cases with ease.
3
+
4
+ Sample rWebUnit Test:
5
+
6
+ require 'rwebspec'
7
+
8
+ spec "Locate a Suncorp Branch" do
9
+ include RWebSpec::RSpecHelper
10
+
11
+ before(:all) do
12
+ open_browser_with("http://suncorp.com.au/")
13
+ end
14
+
15
+ before(:each) do
16
+ goto_page("/locator")
17
+ end
18
+
19
+ after(:all) do
20
+ close_browser
21
+ end
22
+
23
+ scenario "Find by extended trading hours" do
24
+ checkbox(:id, "OpenExtendedTradingHoursSerivceId").click # using Watir directly
25
+ enter_text("Postcode_Locator__Postcode", "4061")
26
+ click_button_with_image("search_button.gif")
27
+ page_source.should include("Queen St Mall")
28
+ end
29
+ end
30
+
31
+
32
+ iTest2 Homepage: http://www.itest2.com
33
33
 
data/Rakefile CHANGED
@@ -1,94 +1,94 @@
1
- require 'rubygems'
2
- require 'spec/rake/spectask'
3
- require 'rake/rdoctask'
4
- require 'rake/gempackagetask'
5
- require 'rdoc' # require rdoc 2
6
- gem 'darkfish-rdoc'
7
- # require 'darkfish-rdoc'
8
-
9
- $:.unshift(File.dirname(__FILE__) + "/lib")
10
- #require 'rwebspec'
11
-
12
- desc "Default task"
13
- task :default => [ :clean, :spec, :rdoc, :chm, :gem]
14
-
15
- desc "Clean generated files"
16
- task :clean do
17
- rm_rf 'pkg'
18
- rm_rf 'doc'
19
- rm_rf 'chm'
20
- end
21
-
22
- desc 'Run all specs'
23
- Spec::Rake::SpecTask.new('spec') do |t|
24
- t.spec_opts = ['--format', 'specdoc', '--colour']
25
- # t.libs = ["lib", "server/lib" ]
26
- t.spec_files = Dir['spec/**/*_spec.rb'].sort
27
- end
28
-
29
- # Generate the RDoc documentation
30
- # Rake::RDocTask.new { |rdoc|
31
- # rdoc.rdoc_dir = 'doc'
32
- # rdoc.title = 'rWebUnit'
33
- # rdoc.template = "#{ENV['template']}.rb" if ENV['template']
34
- # rdoc.rdoc_files.include('README')
35
- # rdoc.rdoc_files.include('lib/rwebspec.rb')
36
- # rdoc.rdoc_files.include('lib/rwebspec/*.rb')
37
- # }
38
-
39
- # using DarkFish - http://deveiate.org/projects/Darkfish-Rdoc/
40
- Rake::RDocTask.new do |rdoc|
41
- rdoc.rdoc_dir = 'doc'
42
- rdoc.title = 'RWebSpec'
43
- rdoc.rdoc_files.include('lib/rwebspec.rb')
44
- rdoc.rdoc_files.include('lib/rwebspec/*.rb')
45
- rdoc.options += [
46
- '-SHN',
47
- '-f', 'darkfish', # This is the important bit
48
- ]
49
- end
50
-
51
- Rake::RDocTask.new("chm") do |rdoc|
52
- rdoc.rdoc_dir = 'chm'
53
- rdoc.title = 'RWebSpec'
54
- rdoc.rdoc_files.include('lib/rwebspec.rb')
55
- rdoc.rdoc_files.include('lib/rwebspec/*.rb')
56
- rdoc.options += [
57
- '-SHN',
58
- '-f', 'chm', # This is the important bit
59
- ]
60
- end
61
-
62
-
63
- spec = Gem::Specification.new do |s|
64
- s.platform= Gem::Platform::RUBY
65
- s.name = "rwebspec"
66
- s.version = "1.4.0"
67
- s.summary = "Executable functional specification for web applications in RSpec syntax and Watir"
68
- # s.description = ""
69
-
70
- s.author = "Zhimin Zhan"
71
- s.email = "zhimin@agileway.net"
72
- s.homepage= "http://github.com/zhimin/rwebspec/tree/master"
73
- s.rubyforge_project = "rwebspec"
74
-
75
- s.has_rdoc = true
76
- s.requirements << 'none'
77
- s.require_path = "lib"
78
- s.autorequire = "rwebspec"
79
-
80
- s.files = [ "Rakefile", "README", "CHANGELOG", "MIT-LICENSE" ]
81
- s.files = s.files + Dir.glob( "lib/**/*" )
82
- s.files = s.files + Dir.glob( "test/**/*" )
83
- s.files = s.files + Dir.glob( "sample/**/*")
84
- s.files = s.files + Dir.glob( "docs/**/*" )
85
- s.add_dependency(%q<rspec>, ["= 1.1.12"])
86
- s.add_dependency("commonwatir", ">= 1.6.2")
87
- s.add_dependency("test-unit", ">= 2.0.2")
88
- # s.add_dependency("watir", ">= 1.6.2")
89
- # s.add_dependency("firewatir", ">= 1.6.2")
90
- end
91
-
92
- Rake::GemPackageTask.new(spec) do |pkg|
93
- pkg.need_zip = true
94
- end
1
+ require 'rubygems'
2
+ require 'spec/rake/spectask'
3
+ require 'rake/rdoctask'
4
+ require 'rake/gempackagetask'
5
+ require 'rdoc' # require rdoc 2
6
+ gem 'darkfish-rdoc'
7
+ # require 'darkfish-rdoc'
8
+
9
+ $:.unshift(File.dirname(__FILE__) + "/lib")
10
+ #require 'rwebspec'
11
+
12
+ desc "Default task"
13
+ task :default => [ :clean, :spec, :rdoc, :chm, :gem]
14
+
15
+ desc "Clean generated files"
16
+ task :clean do
17
+ rm_rf 'pkg'
18
+ rm_rf 'doc'
19
+ rm_rf 'chm'
20
+ end
21
+
22
+ desc 'Run all specs'
23
+ Spec::Rake::SpecTask.new('spec') do |t|
24
+ t.spec_opts = ['--format', 'specdoc', '--colour']
25
+ # t.libs = ["lib", "server/lib" ]
26
+ t.spec_files = Dir['spec/**/*_spec.rb'].sort
27
+ end
28
+
29
+ # Generate the RDoc documentation
30
+ # Rake::RDocTask.new { |rdoc|
31
+ # rdoc.rdoc_dir = 'doc'
32
+ # rdoc.title = 'rWebUnit'
33
+ # rdoc.template = "#{ENV['template']}.rb" if ENV['template']
34
+ # rdoc.rdoc_files.include('README')
35
+ # rdoc.rdoc_files.include('lib/rwebspec.rb')
36
+ # rdoc.rdoc_files.include('lib/rwebspec/*.rb')
37
+ # }
38
+
39
+ # using DarkFish - http://deveiate.org/projects/Darkfish-Rdoc/
40
+ Rake::RDocTask.new do |rdoc|
41
+ rdoc.rdoc_dir = 'doc'
42
+ rdoc.title = 'RWebSpec'
43
+ rdoc.rdoc_files.include('lib/rwebspec.rb')
44
+ rdoc.rdoc_files.include('lib/rwebspec/*.rb')
45
+ rdoc.options += [
46
+ '-SHN',
47
+ '-f', 'darkfish', # This is the important bit
48
+ ]
49
+ end
50
+
51
+ Rake::RDocTask.new("chm") do |rdoc|
52
+ rdoc.rdoc_dir = 'chm'
53
+ rdoc.title = 'RWebSpec'
54
+ rdoc.rdoc_files.include('lib/rwebspec.rb')
55
+ rdoc.rdoc_files.include('lib/rwebspec/*.rb')
56
+ rdoc.options += [
57
+ '-SHN',
58
+ '-f', 'chm', # This is the important bit
59
+ ]
60
+ end
61
+
62
+
63
+ spec = Gem::Specification.new do |s|
64
+ s.platform= Gem::Platform::RUBY
65
+ s.name = "rwebspec"
66
+ s.version = "1.4.0.1"
67
+ s.summary = "Executable functional specification for web applications in RSpec syntax and Watir"
68
+ # s.description = ""
69
+
70
+ s.author = "Zhimin Zhan"
71
+ s.email = "zhimin@agileway.net"
72
+ s.homepage= "http://github.com/zhimin/rwebspec/tree/master"
73
+ s.rubyforge_project = "rwebspec"
74
+
75
+ s.has_rdoc = true
76
+ s.requirements << 'none'
77
+ s.require_path = "lib"
78
+ s.autorequire = "rwebspec"
79
+
80
+ s.files = [ "Rakefile", "README", "CHANGELOG", "MIT-LICENSE" ]
81
+ s.files = s.files + Dir.glob( "lib/**/*" )
82
+ s.files = s.files + Dir.glob( "test/**/*" )
83
+ s.files = s.files + Dir.glob( "sample/**/*")
84
+ s.files = s.files + Dir.glob( "docs/**/*" )
85
+ s.add_dependency(%q<rspec>, ["= 1.1.12"])
86
+ s.add_dependency("commonwatir", ">= 1.6.2")
87
+ s.add_dependency("test-unit", ">= 2.0.2")
88
+ # s.add_dependency("watir", ">= 1.6.2")
89
+ # s.add_dependency("firewatir", ">= 1.6.2")
90
+ end
91
+
92
+ Rake::GemPackageTask.new(spec) do |pkg|
93
+ pkg.need_zip = true
94
+ end
@@ -1,51 +1,51 @@
1
- module Spec
2
- module Extensions
3
- module Main
4
-
5
- alias :spec :describe
6
- alias :specification :describe
7
- alias :test_suite :describe
8
- alias :suite :describe
9
-
10
- end
11
- end
12
- end
13
-
14
- # For RSpec 1.1.12
15
- module Spec
16
- module DSL
17
- module Main
18
-
19
- alias :spec :describe
20
- alias :specification :describe
21
- alias :test_suite :describe
22
- alias :suite :describe
23
-
24
- end
25
- end
26
- end
27
-
28
- # ZZ patches to RSpec 1.1.4
29
- # - add to_s method to example_group
30
- module Spec
31
- module Example
32
- class ExampleGroup
33
- def to_s
34
- @_defined_description
35
- end
36
- end
37
- end
38
- end
39
-
40
- module Spec
41
- module Example
42
- module ExampleGroupMethods
43
-
44
- alias_method :scenario, :it
45
- alias_method :story, :it
46
- alias_method :test_case, :it
47
- alias_method :use_case, :it
48
- alias_method :test, :it
49
- end
50
- end
1
+ module Spec
2
+ module Extensions
3
+ module Main
4
+
5
+ alias :spec :describe
6
+ alias :specification :describe
7
+ alias :test_suite :describe
8
+ alias :suite :describe
9
+
10
+ end
11
+ end
12
+ end
13
+
14
+ # For RSpec 1.1.12
15
+ module Spec
16
+ module DSL
17
+ module Main
18
+
19
+ alias :spec :describe
20
+ alias :specification :describe
21
+ alias :test_suite :describe
22
+ alias :suite :describe
23
+
24
+ end
25
+ end
26
+ end
27
+
28
+ # ZZ patches to RSpec 1.1.4
29
+ # - add to_s method to example_group
30
+ module Spec
31
+ module Example
32
+ class ExampleGroup
33
+ def to_s
34
+ @_defined_description
35
+ end
36
+ end
37
+ end
38
+ end
39
+
40
+ module Spec
41
+ module Example
42
+ module ExampleGroupMethods
43
+
44
+ alias_method :scenario, :it
45
+ alias_method :story, :it
46
+ alias_method :test_case, :it
47
+ alias_method :use_case, :it
48
+ alias_method :test, :it
49
+ end
50
+ end
51
51
  end