Sha256: 784ab5a19fdb3c5e0d7f79c34a83b14d6531761c6f77b76ad382a29990532870
Contents?: true
Size: 852 Bytes
Versions: 18
Compression:
Stored size: 852 Bytes
Contents
require 'test_helper' class ApplicationHelperTest < ActionView::TestCase context "The element_id method" do context "when given an object" do context "with a new object" do setup do @obj = Scenario.new @id = element_id(@obj) end should "return a string" do assert_equal String, @id.class end should "return a string containing the class name" do # Story_ assert_match /#{@obj.class.to_s}/, @id end context "with an existing object" do setup do @obj = Scenario.make @id = element_id(@obj) end should "return a string containing the class name and id" do assert_match /#{@obj.class.to_s}_#{@obj.id}/, @id end end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems