Sha256: 77444da882cf662431fb139c0a90834cdb19f3d4922b575dc6bd802a95f2c645
Contents?: true
Size: 657 Bytes
Versions: 4
Compression:
Stored size: 657 Bytes
Contents
module HelperMethods # Checks for missing translations after each test def teardown unless source.blank? matches = source.match(/translation[\s-]+missing[^"]*/) || [] assert_equal 0, matches.length, "Translation Missing! - #{matches[0]}" end end # An assertion for ensuring content has made it to the page. # # assert_seen "Site Title" # assert_seen "Peanut Butter Jelly Time", :within => ".post-title h1" # def assert_seen(text, opts={}) if opts[:within] within(opts[:within]) do assert has_content?(text) end else assert has_content?(text) end end end
Version data entries
4 entries across 4 versions & 1 rubygems