cucumber-screenshot 0.2.1-universal-darwin → 0.2.2-universal-darwin

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 1
2
+ :patch: 2
3
3
  :major: 0
4
4
  :minor: 2
@@ -42,7 +42,7 @@ module CucumberScreenshot
42
42
 
43
43
  def rewrite_javascript_and_css_and_image_references(response_html) # :nodoc:
44
44
  doc_root = webrat_session.adapter.doc_root
45
- return response_html unless doc_root
45
+ return response_html unless doc_root && response_html
46
46
  response_html.gsub(/"\/(javascripts|stylesheets|images)\//, '"' + doc_root + '/\1/')
47
47
  end
48
48
 
@@ -101,6 +101,10 @@ describe CucumberScreenshot::World do
101
101
  @session.send(:rewrite_javascript_and_css_and_image_references, '<link href="/stylesheets/application.css" media="screen" rel="stylesheet" type="text/css" />').
102
102
  should == '<link href="/tmp/public/stylesheets/application.css" media="screen" rel="stylesheet" type="text/css" />'
103
103
  end
104
+
105
+ it 'should return nil when passed nil' do
106
+ @session.send(:rewrite_javascript_and_css_and_image_references, nil).should be_nil
107
+ end
104
108
  end
105
109
  end
106
110
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber-screenshot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: universal-darwin
6
6
  authors:
7
7
  - Joel Chippindale
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-01 00:00:00 +00:00
12
+ date: 2009-12-21 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency