magicspec 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +4 -0
- data/lib/magicspec/generators/magicspec/app/spec/spec_helper.rb.tt +26 -3
- data/lib/magicspec/generators/magicspec/app/spec/yale/yale_example_spec.rb +27 -29
- data/lib/magicspec/generators/magicspec/config/config.yml +4 -3
- data/magicspec.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f012ab98d6311283cd8c065ff68a5eebcb5484f3
|
4
|
+
data.tar.gz: f180239020dc6aa269450ab48674c9941356266f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d4efc76a60260c1111666535b161467c48ff540257f63f19387935526b2b1c1b5225a2a547042916f63e2eec87829ac43760e6c9c01e74a81fe3ec183f4d6e0
|
7
|
+
data.tar.gz: 81c487778e1b7957fb90ca8d347b86cb35b4d5aea61a109024028184bdb16e03e5630e464edbcd52731b242457e14ab269ee8dde9acbc9926ec6be38e7bb317f
|
data/Gemfile
CHANGED
@@ -5,7 +5,11 @@ source "https://rubygems.org"
|
|
5
5
|
# Add dependencies to develop your gem here.
|
6
6
|
# Include everything needed to run rake, tests, features, etc.
|
7
7
|
gem "page-object"
|
8
|
+
gem "rspec"
|
9
|
+
gem "rspec-rerun"
|
10
|
+
gem "fuubar"
|
8
11
|
gem "thor"
|
12
|
+
gem "watir-browser-factory"
|
9
13
|
|
10
14
|
group :development do
|
11
15
|
gem "rdoc"
|
@@ -6,9 +6,6 @@ require 'fuubar'
|
|
6
6
|
require 'magicspec'
|
7
7
|
require 'active_record'
|
8
8
|
require 'net/http'
|
9
|
-
require 'byebug'
|
10
|
-
require 'rest_client'
|
11
|
-
require 'sauce_whisk'
|
12
9
|
require 'watir-browser-factory'
|
13
10
|
require 'rspec-rest-formatter'
|
14
11
|
|
@@ -40,6 +37,32 @@ $:.unshift(File.expand_path File.join('.'))
|
|
40
37
|
# Make sure all of our supporting files are loaded
|
41
38
|
Dir["./app/spec/support/**/*.rb"].sort.each {|f|require f}
|
42
39
|
|
40
|
+
# Determine if we're local or not and setup accordingly.
|
41
|
+
if ENV['RUNTIME']
|
42
|
+
$params = eval(ENV['RUNTIME'])
|
43
|
+
$caps = {
|
44
|
+
:browserName => $params[:platform]["browser"],
|
45
|
+
:browser_version => $params[:platform]["version"],
|
46
|
+
:os => $params[:platform]["os"],
|
47
|
+
:local => false
|
48
|
+
}
|
49
|
+
$metadata = {
|
50
|
+
:notes => $params[:notes],
|
51
|
+
:description => $config[:description]
|
52
|
+
}
|
53
|
+
else
|
54
|
+
$caps = {
|
55
|
+
:browserName => $config["browser"],
|
56
|
+
:browser_version => "TBD",
|
57
|
+
:os => Uname.uname["sysname"],
|
58
|
+
:local => true
|
59
|
+
}
|
60
|
+
$metadata = {
|
61
|
+
:notes => $config[:notes],
|
62
|
+
:description => $config[:description]
|
63
|
+
}
|
64
|
+
end
|
65
|
+
|
43
66
|
RSpec.configure do |c|
|
44
67
|
c.treat_symbols_as_metadata_keys_with_true_values = true
|
45
68
|
c.run_all_when_everything_filtered = true
|
@@ -1,34 +1,32 @@
|
|
1
1
|
#encoding: utf-8
|
2
2
|
require File.expand_path 'app/spec/spec_helper'
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
expect(result_page.term_found?(term)).to eq true
|
28
|
-
end
|
29
|
-
end
|
30
|
-
after(:all) do
|
31
|
-
@browser.close rescue nil
|
32
|
-
end
|
4
|
+
describe 'The Yale home page', :yale do
|
5
|
+
|
6
|
+
before(:all) do
|
7
|
+
@browser = Watir::Browser.sauce_start($caps)
|
8
|
+
@yale_page = YalePage.new(@browser)
|
9
|
+
@yale_page.goto
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'has the correct title' do
|
13
|
+
expect(@yale_page.title).to eq 'Yale University'
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'has the correct text' do
|
17
|
+
expect(@yale_page.text).to include 'Harvard'
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'has the correct links'
|
21
|
+
|
22
|
+
describe 'The Yale search', :yale do
|
23
|
+
term = "stuff"
|
24
|
+
it "has the correct results for '#{term}'" do
|
25
|
+
result_page = @yale_page.search_for term
|
26
|
+
expect(result_page.term_found?(term)).to eq true
|
33
27
|
end
|
28
|
+
end
|
29
|
+
after(:all) do
|
30
|
+
@browser.close rescue nil
|
31
|
+
end
|
34
32
|
end
|
data/magicspec.gemspec
CHANGED