spec/pager_spec.rb in command_kit-0.1.0.pre2 vs spec/pager_spec.rb in command_kit-0.1.0.rc1

- old
+ new

@@ -93,14 +93,14 @@ end end end describe "#print_or_page" do - let(:console_height) { 10 } + let(:terminal_height) { 10 } before do - expect(subject).to receive(:console_height).and_return(console_height) + expect(subject).to receive(:terminal_height).and_return(terminal_height) end context "when given a String" do context "and the number of lines is less than the console's height" do let(:string) { "foo#{$/}bar#{$/}" } @@ -111,11 +111,11 @@ subject.print_or_page(string) end end context "and the number of lines is greater than the console's height" do - let(:string) { "foo#{$/}bar#{$/}" * console_height } + let(:string) { "foo#{$/}bar#{$/}" * terminal_height } it "must spawn a pager and puts the String to the pager" do pager = double('pager') expect(subject).to receive(:pager).and_yield(pager) expect(pager).to receive(:puts).with(string) @@ -135,10 +135,10 @@ subject.print_or_page(array) end end context "and the number of lines is greater than the console's height" do - let(:array) { ['foo', 'bar'] * console_height } + let(:array) { ['foo', 'bar'] * terminal_height } it "must spawn a pager and puts the Array of Strings to the pager" do pager = double('pager') expect(subject).to receive(:pager).and_yield(pager) expect(pager).to receive(:puts).with(array)