aboutsummaryrefslogtreecommitdiffstats
path: root/spec/rubyspec/library/readline/history/empty_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/rubyspec/library/readline/history/empty_spec.rb')
-rw-r--r--spec/rubyspec/library/readline/history/empty_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/rubyspec/library/readline/history/empty_spec.rb b/spec/rubyspec/library/readline/history/empty_spec.rb
new file mode 100644
index 0000000000..92a4fcd063
--- /dev/null
+++ b/spec/rubyspec/library/readline/history/empty_spec.rb
@@ -0,0 +1,13 @@
+require File.expand_path('../../spec_helper', __FILE__)
+
+with_feature :readline do
+ describe "Readline::HISTORY.empty?" do
+ it "returns true when the history is empty" do
+ Readline::HISTORY.should be_empty
+ Readline::HISTORY.push("test")
+ Readline::HISTORY.should_not be_empty
+ Readline::HISTORY.pop
+ Readline::HISTORY.should be_empty
+ end
+ end
+end