Sha256: d0fd4adf3ec96e98265df9d44cf768e3c77d518527d4cf2e134601c78f589cbd
Contents?: true
Size: 1.05 KB
Versions: 7
Compression:
Stored size: 1.05 KB
Contents
require 'test_helper' class HickwellTest < ActiveSupport::TestCase def setup @hickwell = Hickwell.create! end test "should have 4 attributes, foo, bar, baz, qux" do assert Hickwell.column_names.include?("foo"), "Missing attribute: foo" assert Hickwell.column_names.include?("bar"), "Missing attribute: bar" assert Hickwell.column_names.include?("baz"), "Missing attribute: baz" assert Hickwell.column_names.include?("qux"), "Missing attribute: qux" end test "should have maskable_attribute qux" do assert @hickwell.maskable_qux.is_a?(MaskableAttribute::MaskableAttribute), "Masked attribute isn't a MaskableAttribute" end test "should have getter and setter methods for qux" do assert_respond_to @hickwell, :qux, "No getter method" assert_respond_to @hickwell, :qux=, "No setter method" end test "should have a quux method" do assert @hickwell.respond_to? :quux, "Missing quux method" end test "returns 'thud' from quux method" do assert_equal 'thud', @hickwell.quux, "#quux not returning 'thud'" end end
Version data entries
7 entries across 7 versions & 1 rubygems