magicspec 0.0.11 → 0.0.14
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.
- checksums.yaml +4 -4
- data/Gemfile +4 -2
- data/README.md +2 -2
- data/lib/magicspec/cli.rb +0 -2
- data/lib/magicspec/generators/magicspec/app/spec/spec_helper.rb.tt +9 -12
- data/lib/magicspec/templates/browser_spec_template.rb.tt +3 -3
- data/magicspec.gemspec +3 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91905c6cf2924e447a0dccbcd9cf6c2440f13be0
|
4
|
+
data.tar.gz: ed4f5145acbaa4c8b5b1dcf26cabf095009d23c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 333a064cf1d1f343ee8d2a95c1be5f19d2c22c08936d9f15aa686b4af884416fd35d2c2ded9b31c107223bd5f429636cfe61d8c515206582bd7ce120d1664f09
|
7
|
+
data.tar.gz: 335b513d341f976ff6d5830ff4a7b4a15ae96434d55cd8032cb4923d00c2fbdd13c5f59bf093996582670328d1a550b208779e3f7a11b396230c5d799a6c8fce
|
data/Gemfile
CHANGED
@@ -6,12 +6,14 @@ source "https://rubygems.org"
|
|
6
6
|
# Include everything needed to run rake, tests, features, etc.
|
7
7
|
gem "page-object"
|
8
8
|
gem "rspec"
|
9
|
-
gem "rspec-rerun"
|
9
|
+
#gem "rspec-rerun"
|
10
10
|
gem "fuubar"
|
11
11
|
gem "thor"
|
12
12
|
gem "watir-browser-factory"
|
13
13
|
gem "net-ping"
|
14
|
-
gem 'rspec-rest-formatter', :git => 'https://git.yale.edu/YaleQA/rspec-rest-formatter'
|
14
|
+
gem 'rspec-rest-formatter', :git => 'https://git.yale.edu/YaleQA/rspec-rest-formatter.git'
|
15
|
+
gem 'info_vault', :git => 'https://git.yale.edu/YaleQA/info_vault.git'
|
16
|
+
|
15
17
|
|
16
18
|
group :development do
|
17
19
|
gem "rdoc"
|
data/README.md
CHANGED
@@ -50,13 +50,13 @@ Understand magicspec project structure
|
|
50
50
|
A magicspec project has a clean and simple structure.
|
51
51
|
|
52
52
|
* app: holds your test code;
|
53
|
-
* config: where your config file placed
|
53
|
+
* config: where your config file is placed. You set things such as tags and your browser here.
|
54
54
|
|
55
55
|
* app->pages: puts all your pages files here;
|
56
56
|
* app->pages->components: sometimes,there are some html element that could be reused more than once, define a component, place the file here and you can include your components in your pages.
|
57
57
|
|
58
58
|
* app->spec: holds your testcase files;
|
59
|
-
* app->spec->shared:
|
59
|
+
* app->spec->shared: Imaging that, you are testing a system which need to login before any actions, so you want to define a login function which can be called from your cases. Define reused cases here.
|
60
60
|
|
61
61
|
* app->reports: the fold holds your test reports.
|
62
62
|
|
data/lib/magicspec/cli.rb
CHANGED
@@ -9,7 +9,6 @@ module Magicspec
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def self.source_paths
|
12
|
-
puts source_root
|
13
12
|
[source_root + '/generators', source_root + '/templates']
|
14
13
|
end
|
15
14
|
|
@@ -27,7 +26,6 @@ module Magicspec
|
|
27
26
|
def start
|
28
27
|
ARGV.shift
|
29
28
|
puts "rspec #{ARGV.join('')}" if $debug
|
30
|
-
#run "LOCAL=true rspec #{ARGV.join('')}"
|
31
29
|
run "LOCAL=true rspec"
|
32
30
|
end
|
33
31
|
|
@@ -40,7 +40,7 @@ if ENV['RUNTIME']
|
|
40
40
|
$caps = {
|
41
41
|
:browserName => $params[:platform]["browser"],
|
42
42
|
:browser_version => $params[:platform]["version"],
|
43
|
-
:
|
43
|
+
:platform => $params[:platform]["os"],
|
44
44
|
:local => false
|
45
45
|
}
|
46
46
|
$metadata = {
|
@@ -52,7 +52,7 @@ else
|
|
52
52
|
$caps = {
|
53
53
|
:browserName => $config["browser"],
|
54
54
|
:browser_version => "unknown",
|
55
|
-
:
|
55
|
+
:platform => RbConfig::CONFIG["host_os"],
|
56
56
|
:local => true
|
57
57
|
}
|
58
58
|
$metadata = {
|
@@ -63,6 +63,13 @@ else
|
|
63
63
|
end
|
64
64
|
|
65
65
|
RSpec.configure do |c|
|
66
|
+
# Read all of the config files to a instance variable containing a hash of the same name.
|
67
|
+
c.before(:all) {
|
68
|
+
Dir["./app/test_data/**/*.yml"].each do |f|
|
69
|
+
instance_variable_set("@#{File.basename(f,'.*')}",YAML.load_file(f))
|
70
|
+
end
|
71
|
+
}
|
72
|
+
|
66
73
|
c.treat_symbols_as_metadata_keys_with_true_values = true
|
67
74
|
c.run_all_when_everything_filtered = true
|
68
75
|
c.alias_example_to :test_case
|
@@ -132,14 +139,4 @@ RSpec.configure do |c|
|
|
132
139
|
end
|
133
140
|
end
|
134
141
|
end
|
135
|
-
|
136
|
-
def test_data file
|
137
|
-
content = ''
|
138
|
-
file_path = File.expand_path(File.join('.', 'app', 'test_data', "#{file}.yml"))
|
139
|
-
raise "Can not find #{file}.yml" unless File.exists?(file_path)
|
140
|
-
File.open(file_path, 'r') do |handle|
|
141
|
-
content = handle.read
|
142
|
-
end
|
143
|
-
Psych.load ERB.new(content).result(binding)
|
144
|
-
end
|
145
142
|
end
|
@@ -2,9 +2,9 @@
|
|
2
2
|
require File.expand_path 'app/spec/spec_helper'
|
3
3
|
|
4
4
|
# Remember to tag your tests!
|
5
|
-
# You can add
|
6
|
-
describe "The browser
|
7
|
-
# These are the things
|
5
|
+
# You can add multiple tags
|
6
|
+
describe "The browser template",:template do
|
7
|
+
# These are the things your do to setup you test.
|
8
8
|
# For example start the browser or gather data.
|
9
9
|
before(:all) do
|
10
10
|
@browser = Watir::Browser.sauce_start($caps)
|
data/magicspec.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "magicspec"
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.14"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["dmfranko"]
|
@@ -94,9 +94,10 @@ Gem::Specification.new do |s|
|
|
94
94
|
s.add_runtime_dependency(%q<thor>, [">= 0"])
|
95
95
|
s.add_runtime_dependency(%q<rspec>, [">= 0"])
|
96
96
|
s.add_runtime_dependency(%q<fuubar>, [">= 0"])
|
97
|
-
s.add_runtime_dependency(%q<rspec-rerun>, [">= 0"])
|
97
|
+
#s.add_runtime_dependency(%q<rspec-rerun>, [">= 0"])
|
98
98
|
s.add_runtime_dependency(%q<watir-webdriver>, [">= 0"])
|
99
99
|
s.add_runtime_dependency(%q<watir-browser-factory>, [">= 0"])
|
100
|
+
s.add_runtime_dependency(%q<info_vault>, [">= 0"])
|
100
101
|
s.add_development_dependency(%q<rdoc>, [">= 0"])
|
101
102
|
s.add_development_dependency(%q<bundler>, [">= 0"])
|
102
103
|
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: magicspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dmfranko
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: watir-webdriver
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -81,7 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name: watir-
|
84
|
+
name: watir-browser-factory
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
@@ -95,7 +95,7 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: info_vault
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - ">="
|