spec/ruco/application_spec.rb in ruco-0.0.18 vs spec/ruco/application_spec.rb in ruco-0.0.19
- old
+ new
@@ -123,15 +123,23 @@
app.key(:enter)
app.key('a')
editor_part(app.view).should == " \n a\n"
end
- it "indents when typing and the next line has more whitespace" do
+ it "indents when at end of line and the next line has more whitespace" do
write("a\n b\n")
app.key(:right)
app.key(:enter)
app.key('c')
editor_part(app.view).should == "a\n c\n b"
+ end
+
+ it "does not indent when inside line and next line has more whitespace" do
+ write("ab\n b\n")
+ app.key(:right)
+ app.key(:enter)
+ app.key('c')
+ editor_part(app.view).should == "a\ncb\n b"
end
end
describe '.ruco.rb' do
it "loads it and can use the bound keys" do
\ No newline at end of file