utensils 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -0
- data/README.md +14 -9
- data/lib/utensils/timecop.rb +5 -0
- data/lib/utensils/version.rb +1 -1
- metadata +10 -3
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -17,6 +17,7 @@ Add this line to your application's Gemfile:
|
|
17
17
|
require 'utensils/capybara_extensions'
|
18
18
|
require 'utensils/custom_matchers'
|
19
19
|
require 'utensils/database_cleaner'
|
20
|
+
require 'utensils/timecop'
|
20
21
|
require 'utensils/upload_macros'
|
21
22
|
require 'utensils/vcr'
|
22
23
|
```
|
@@ -27,7 +28,7 @@ Allows you to use active record objects with capybara finders
|
|
27
28
|
|
28
29
|
```ruby
|
29
30
|
page.within(post) { click_link('Edit') }
|
30
|
-
page.find(book_2).drag_to(page.find(book_1))
|
31
|
+
page.find(book_2).drag_to(page.find(book_1))
|
31
32
|
```
|
32
33
|
|
33
34
|
### custom_matchers
|
@@ -45,12 +46,16 @@ page.should have_order(recipe_3, recipe_1, recipe_2) #checks that objects are in
|
|
45
46
|
|
46
47
|
Sets up rspec to use database_cleaner instead of transactional fixtures
|
47
48
|
|
49
|
+
### timecop
|
50
|
+
|
51
|
+
Resets timecop after each spec
|
52
|
+
|
48
53
|
### upload_macros
|
49
54
|
|
50
55
|
Provides fixture_file helper pointing to spec/fixtures directory
|
51
56
|
|
52
57
|
```ruby
|
53
|
-
Photo.create(:file => 'dummy.jpg') #attaches spec/fixtures/dummy.jpg
|
58
|
+
Photo.create(:file => fixture_file('dummy.jpg')) #attaches spec/fixtures/dummy.jpg
|
54
59
|
```
|
55
60
|
|
56
61
|
### vcr
|
@@ -59,10 +64,10 @@ Disables all outgoing http requests except for examples marked with :allow_http,
|
|
59
64
|
|
60
65
|
```ruby
|
61
66
|
describe 'examples' do
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
end
|
67
|
+
it 'uses http cached with VCR', :allow_http do
|
68
|
+
...
|
69
|
+
end
|
70
|
+
it 'disables all outgoing http' do
|
71
|
+
...
|
72
|
+
end
|
73
|
+
end
|
data/lib/utensils/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utensils
|
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,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-06-12 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Rspec stuff we use over and over again
|
15
15
|
email:
|
@@ -27,6 +27,7 @@ files:
|
|
27
27
|
- lib/utensils/capybara_extensions.rb
|
28
28
|
- lib/utensils/custom_matchers.rb
|
29
29
|
- lib/utensils/database_cleaner.rb
|
30
|
+
- lib/utensils/timecop.rb
|
30
31
|
- lib/utensils/upload_macros.rb
|
31
32
|
- lib/utensils/vcr.rb
|
32
33
|
- lib/utensils/version.rb
|
@@ -43,15 +44,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
43
44
|
- - ! '>='
|
44
45
|
- !ruby/object:Gem::Version
|
45
46
|
version: '0'
|
47
|
+
segments:
|
48
|
+
- 0
|
49
|
+
hash: 118394701192741233
|
46
50
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
47
51
|
none: false
|
48
52
|
requirements:
|
49
53
|
- - ! '>='
|
50
54
|
- !ruby/object:Gem::Version
|
51
55
|
version: '0'
|
56
|
+
segments:
|
57
|
+
- 0
|
58
|
+
hash: 118394701192741233
|
52
59
|
requirements: []
|
53
60
|
rubyforge_project:
|
54
|
-
rubygems_version: 1.8.
|
61
|
+
rubygems_version: 1.8.23
|
55
62
|
signing_key:
|
56
63
|
specification_version: 3
|
57
64
|
summary: Rspec stuff we use over and over again
|