Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/hirb/view.rb
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def enable_output_method
@output_method = true
::IRB::Irb.class_eval do
alias_method :non_hirb_view_output, :output_value
def output_value #:nodoc:
def output_value(omit = false) #:nodoc:
Hirb::View.view_or_page_output(@context.last_value) || non_hirb_view_output
end
end
Expand Down
7 changes: 7 additions & 0 deletions test/view_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ def formatter_config
::IRB::Irb.new(context_stub).output_value
end

it "output_value accept omit argument from IRB" do
View.expects(:render_output).once
Hirb.enable
context_stub = stub(:last_value=>'')
::IRB::Irb.new(context_stub).output_value(true)
end

it "is enabled?" do
Hirb.enable
View.enabled?.should == true
Expand Down