parent
45e714776e
commit
44ebc7375a
2 changed files with 0 additions and 26 deletions
|
|
@ -1,25 +0,0 @@
|
|||
class SpecDoc
|
||||
def initialize(response)
|
||||
@html = Nokogiri::HTML(response.body)
|
||||
end
|
||||
|
||||
def method_missing(method, *args)
|
||||
@html.send method, *args
|
||||
end
|
||||
|
||||
def has_content?(string)
|
||||
escaped = string.gsub("'", "\\'")
|
||||
@html.xpath("//*[contains(text(), '#{escaped}')]").any?
|
||||
end
|
||||
def has_no_content?(string)
|
||||
! has_content?(string)
|
||||
end
|
||||
|
||||
def has_link?(text)
|
||||
@html.xpath("//a[text()='#{text}']").any?
|
||||
end
|
||||
end
|
||||
|
||||
def doc
|
||||
SpecDoc.new response
|
||||
end
|
||||
|
|
@ -9,7 +9,6 @@ Coveralls.wear!('rails')
|
|||
|
||||
require File.join(File.dirname(__FILE__), "..", "config", "environment")
|
||||
require Rails.root.join("spec", "helper_methods")
|
||||
require Rails.root.join("spec", "spec-doc")
|
||||
require "rspec/rails"
|
||||
require "webmock/rspec"
|
||||
require "factory_girl"
|
||||
|
|
|
|||
Loading…
Reference in a new issue