spec/parser/line_parsing_spec.rb in iniparse-1.1.3 vs spec/parser/line_parsing_spec.rb in iniparse-1.1.4
- old
+ new
@@ -1,6 +1,6 @@
-require File.dirname(__FILE__) + '/../spec_helper'
+require 'spec_helper'
# Tests parsing of individual, out of context, line types using #parse_line.
describe 'Parsing a line' do
it 'should strip leading whitespace and set the :indent option' do
@@ -149,9 +149,24 @@
end
it 'should set the option value to nil' do
IniParse::Parser.parse_line('key =').should \
be_option_tuple(:any, nil)
+ end
+ end
+
+
+ describe 'with "key = EEjDDJJjDJDJD233232=="' do
+ it 'should include the "equals" in the option value' do
+ IniParse::Parser.parse_line('key = EEjDDJJjDJDJD233232==').should \
+ be_option_tuple('key', 'EEjDDJJjDJDJD233232==')
+ end
+ end
+
+ describe 'with "key = ==EEjDDJJjDJDJD233232"' do
+ it 'should include the "equals" in the option value' do
+ IniParse::Parser.parse_line('key = ==EEjDDJJjDJDJD233232').should \
+ be_option_tuple('key', '==EEjDDJJjDJDJD233232')
end
end
describe 'with "key.two = value"' do
it 'should return an option tuple with the correct key' do