capybara-angular 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/lib/capybara/angular/dsl.rb +6 -4
- data/lib/capybara/angular/version.rb +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -10,7 +10,7 @@ Add this line to your application's Gemfile:
|
|
10
10
|
|
11
11
|
## Usage
|
12
12
|
|
13
|
-
Use it as you would use regular Capybara API, however this time, you won't
|
13
|
+
Use it as you would use regular Capybara API, however this time, you won't face any race conditions when working with AngularJS applications
|
14
14
|
|
15
15
|
## Contributing
|
16
16
|
|
data/lib/capybara/angular/dsl.rb
CHANGED
@@ -5,16 +5,18 @@ module Capybara
|
|
5
5
|
|
6
6
|
Capybara::Session::DSL_METHODS.each do |method|
|
7
7
|
define_method(method) do |*args, &block|
|
8
|
-
|
9
|
-
Capybara.current_session.send(method, *args, &block)
|
8
|
+
page.send(method, *args, &block)
|
10
9
|
end
|
11
10
|
end
|
12
11
|
|
12
|
+
def page
|
13
|
+
wait_until_angular_ready
|
14
|
+
Capybara.current_session
|
15
|
+
end
|
16
|
+
|
13
17
|
def wait_until_angular_ready
|
14
18
|
Waiter.new(Capybara.current_session).wait_until_ready
|
15
19
|
end
|
16
|
-
|
17
|
-
extend DSL
|
18
20
|
end
|
19
21
|
end
|
20
22
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara-angular
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-08-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capybara
|
@@ -91,7 +91,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
91
91
|
version: '0'
|
92
92
|
segments:
|
93
93
|
- 0
|
94
|
-
hash:
|
94
|
+
hash: 2361578581906041586
|
95
95
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
96
|
none: false
|
97
97
|
requirements:
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
version: '0'
|
101
101
|
segments:
|
102
102
|
- 0
|
103
|
-
hash:
|
103
|
+
hash: 2361578581906041586
|
104
104
|
requirements: []
|
105
105
|
rubyforge_project:
|
106
106
|
rubygems_version: 1.8.25
|