Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Jan 15, 2016
1 parent 09a1f09 commit 0f23854
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions library/cwm/test/widgets_test.rb
Expand Up @@ -56,7 +56,7 @@ def initialize(all: nil)
class TNoWidgetType < CWM::AbstractWidget; end

it "raises exception if widget type in child is not specified" do
expect{TNoWidgetType.new.description}.to raise_error(RuntimeError)
expect{TNoWidgetType.new.cwm_definition}.to raise_error(RuntimeError)
end

class THelp < CWM::AbstractWidget
Expand All @@ -67,15 +67,15 @@ def help
end

it "returns hash with \"help\" key and #help result value" do
expect(THelp.new.description["help"]).to eq "helpful string"
expect(THelp.new.cwm_definition["help"]).to eq "helpful string"
end

class TNoHelp < CWM::AbstractWidget
self.widget_type = :empty
end

it "returns hash with \"no_help\" key if no help method specified" do
expect(TNoHelp.new.description).to be_key("no_help")
expect(TNoHelp.new.cwm_definition).to be_key("no_help")
end
end
end
Expand All @@ -99,7 +99,7 @@ def contents
subject { CustomTestWidget.new }

it "adds to description to handle only ids in contents and widget_id" do
expect(subject.description["handle_events"]).to eq [:first, "second", "test_widget"]
expect(subject.cwm_definition["handle_events"]).to eq [:first, "second", "test_widget"]
end
end
end
Expand Down

0 comments on commit 0f23854

Please sign in to comment.