Skip to content

Commit

Permalink
added inifile method to dump raw config
Browse files Browse the repository at this point in the history
  • Loading branch information
auxesis committed Nov 27, 2009
1 parent 6da94aa commit e20b812
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/flapjack/inifile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ def keys
def self.read(filename)
self.new(File.read(filename))
end

def all
@data
end

end
end
Expand Down
6 changes: 6 additions & 0 deletions spec/inifile_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,11 @@
ini["forks"].keys.sort.should == %w(bar foo hello)
end

it "should dump the raw config" do
example = "[forks]\nhello = world\n[spoons]\nfoo = bar\n[splades]\nbar = baz"
ini = Flapjack::Inifile.new(example)
ini.all.size.should == 3
end


end

0 comments on commit e20b812

Please sign in to comment.