test/integration/app_test.rb in ns-options-0.1.1 vs test/integration/app_test.rb in ns-options-0.2.0

- old
+ new

@@ -37,27 +37,33 @@ should have_instance_methods :sub should "have set the stage to 'test'" do assert_equal @stage, subject.stage end + should "have set the root to this gem's dir" do assert_equal Pathname.new(@root_path), subject.root end + should "have set the logger to the passed logger" do assert_equal @logger, subject.logger assert_same @logger, subject.logger end + + should "have set its self_stage option to its stage" do + assert_equal @stage, subject.self_stage + assert_same @stage, subject.self_stage + end + end - + class SubNamespaceTest < DefineTest desc "the sub namespace" subject{ @module.settings.sub } - + should "have set the run_commands option" do - assert_equal @run, subject.run_commands - end - should "have access to it's parent's options" do - assert_equal @stage, subject.stage + assert_kind_of NsOptions::Boolean, subject.run_commands + assert_equal @run, subject.run_commands.actual end end end