capybara-console 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +26 -19
- data/lib/capybara-console/version.rb +1 -1
- metadata +6 -6
data/README.md
CHANGED
@@ -4,36 +4,43 @@ CapybaraConsole
|
|
4
4
|
This tiny gem provides you with a [Capybara](https://github.com/jnicklas/capybara) console for your Rails project.
|
5
5
|
Simply include it in your Gemfile:
|
6
6
|
|
7
|
-
|
7
|
+
```ruby
|
8
|
+
gem 'capybara-console'
|
9
|
+
```
|
8
10
|
|
9
|
-
|
11
|
+
then run
|
10
12
|
|
11
|
-
|
13
|
+
``` bash
|
14
|
+
rake capybara:console
|
15
|
+
```
|
12
16
|
|
13
17
|
and you're completely set to go REPLing with Capybara, like
|
14
|
-
|
15
|
-
|
16
|
-
|
18
|
+
``` bash
|
19
|
+
> visit 'http://github.com'
|
20
|
+
```
|
17
21
|
or
|
22
|
+
``` bash
|
23
|
+
> visit '/'
|
24
|
+
```
|
18
25
|
|
19
|
-
|
20
|
-
|
21
|
-
If you need something included in your console by default, create an `capybara:prepare_console` task:
|
26
|
+
If you need something included in your console by default, create a `capybara:prepare_console` task:
|
22
27
|
|
23
|
-
|
28
|
+
``` ruby
|
29
|
+
namespace :capybara do
|
24
30
|
|
25
|
-
|
31
|
+
task :prepare_console do
|
26
32
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
+
def test_path opts
|
34
|
+
path = opts[:path] || '/'
|
35
|
+
subdomain = opts[:subdomain] || 'test'
|
36
|
+
port = Capybara.current_session.server.port
|
37
|
+
url = "http://#{subdomain}.mytestdomain.home:#{port}#{path}"
|
38
|
+
end
|
33
39
|
|
34
|
-
|
40
|
+
end
|
35
41
|
|
36
|
-
|
42
|
+
end
|
43
|
+
```
|
37
44
|
|
38
45
|
Enjoy!
|
39
46
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara-console
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,14 +9,14 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-09-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: '3.0'
|
22
22
|
type: :runtime
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '3.0'
|
30
30
|
- !ruby/object:Gem::Dependency
|
@@ -70,7 +70,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
70
70
|
version: '0'
|
71
71
|
segments:
|
72
72
|
- 0
|
73
|
-
hash:
|
73
|
+
hash: 2502617968918180430
|
74
74
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
75
|
none: false
|
76
76
|
requirements:
|
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
79
|
version: '0'
|
80
80
|
segments:
|
81
81
|
- 0
|
82
|
-
hash:
|
82
|
+
hash: 2502617968918180430
|
83
83
|
requirements: []
|
84
84
|
rubyforge_project:
|
85
85
|
rubygems_version: 1.8.25
|