Skip to content

Commit

Permalink
Removed Pry, spec cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
xslim committed Jan 21, 2013
1 parent 27e8395 commit 290b8f1
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 24 deletions.
22 changes: 0 additions & 22 deletions spec/print_hash_spec.rb

This file was deleted.

19 changes: 19 additions & 0 deletions spec/printable_spec.rb
Expand Up @@ -46,5 +46,24 @@

it "uses column information when available (eg, from ActiveRecord objects)"
end

describe "printing a Hash" do
it "prints an array of hashes" do

data = [{:name => "User 1",
:surname => "Familyname 1"
},
{:name => "User 2",
:surname => "Familyname 2"}]

p = Printer.new(data)
cols = p.columns
cols.length.should == 2
cols.sort! {|x,y| x.name <=> y.name} # To fix Travis bug
cols.first.name.should == 'name'
cols[1].name.should == 'surname'
# puts p.table_print
end
end
end

1 change: 0 additions & 1 deletion spec/spec_helper.rb
Expand Up @@ -2,7 +2,6 @@
gem 'rspec'
require 'table_print'
require 'ostruct'
require 'pry'

RSpec.configure do |c|
c.filter_run :focus => true
Expand Down
1 change: 0 additions & 1 deletion table_print.gemspec
Expand Up @@ -22,5 +22,4 @@ Gem::Specification.new do |gem|
gem.add_development_dependency 'cucumber', '~> 1.2.1'
gem.add_development_dependency 'rspec', '~> 2.11.0'
gem.add_development_dependency 'rake', '~> 0.9.2'
gem.add_development_dependency 'pry'
end

0 comments on commit 290b8f1

Please sign in to comment.