forked from excid3/receipts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,12 @@ | ||
require "bundler/gem_tasks" | ||
require 'rspec/core/rake_task' | ||
|
||
RSpec::Core::RakeTask.new('spec') | ||
|
||
# If you want to make this the default task | ||
task :default => :spec | ||
task :test => :spec | ||
|
||
task :console do | ||
exec "irb -r receipts -I ./lib" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
require 'spec_helper' | ||
|
||
describe Receipts do | ||
it "lets you create a new receipt" do | ||
expect(Receipts::Receipt.new( | ||
id: 1, | ||
product: "GoRails", | ||
company: { | ||
name: "One Month, Inc.", | ||
address: "37 Great Jones\nFloor 2\nNew York City, NY 10012", | ||
email: "[email protected]" | ||
}, | ||
line_items: [ | ||
["Product", "GoRails"], | ||
], | ||
).class.name).to eq("Receipts::Receipt") | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
begin | ||
require 'pry' | ||
rescue LoadError | ||
end | ||
|
||
require 'receipts' | ||
|
||
RSpec.configure do |config| | ||
end |