tobacco 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tobacco/test_helpers.rb +9 -0
- data/lib/tobacco/version.rb +1 -1
- data/spec/tobacco/test_helpers_spec.rb +19 -0
- metadata +4 -1
data/lib/tobacco/version.rb
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require_relative '../../lib/tobacco/test_helpers'
|
3
|
+
|
4
|
+
describe Tobacco::TestHelpers do
|
5
|
+
include Tobacco::TestHelpers
|
6
|
+
|
7
|
+
let(:content) { 'blah' }
|
8
|
+
let(:consumer) { mock('consumer', content_url: '/what') }
|
9
|
+
|
10
|
+
it 'returns supplied content' do
|
11
|
+
mock_page_content(content)
|
12
|
+
|
13
|
+
smoker = Tobacco::Smoker.new(consumer)
|
14
|
+
smoker.read
|
15
|
+
|
16
|
+
smoker.content.should == content
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tobacco
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -117,6 +117,7 @@ files:
|
|
117
117
|
- lib/tobacco/roller.rb
|
118
118
|
- lib/tobacco/safety_net.rb
|
119
119
|
- lib/tobacco/smoker.rb
|
120
|
+
- lib/tobacco/test_helpers.rb
|
120
121
|
- lib/tobacco/version.rb
|
121
122
|
- spec/spec_helper.rb
|
122
123
|
- spec/support/vcr_cassettes/url_content.yml
|
@@ -129,6 +130,7 @@ files:
|
|
129
130
|
- spec/tobacco/roller_spec.rb
|
130
131
|
- spec/tobacco/safety_net_spec.rb
|
131
132
|
- spec/tobacco/smoker_spec.rb
|
133
|
+
- spec/tobacco/test_helpers_spec.rb
|
132
134
|
- spec/tobacco_spec.rb
|
133
135
|
- tobacco.gemspec
|
134
136
|
homepage: https://github.com/CraigWilliams/Tobacco
|
@@ -167,4 +169,5 @@ test_files:
|
|
167
169
|
- spec/tobacco/roller_spec.rb
|
168
170
|
- spec/tobacco/safety_net_spec.rb
|
169
171
|
- spec/tobacco/smoker_spec.rb
|
172
|
+
- spec/tobacco/test_helpers_spec.rb
|
170
173
|
- spec/tobacco_spec.rb
|