Skip to content

Commit

Permalink
Setup basic test
Browse files Browse the repository at this point in the history
  • Loading branch information
DruRly committed Jun 9, 2013
1 parent 55176ac commit 9dc4df2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
18 changes: 18 additions & 0 deletions spec/gemrat_spec.rb
@@ -0,0 +1,18 @@
require 'spec_helper'
describe Gemrat do
before do
test_gemfile = File.new("TestGemfile", "w")
test_gemfile.puts ("https://rubygems.org'\n\n# Specify your gem's dependencies in gemrat.gemspec\ngem 'rspec', '2.13.0'\n")
test_gemfile.close
end

after do
File.delete("TestGemfile")
end

it "example" do
`gemrat sinatra`
gemfile_contents = File.open('TestGemfile').read
gemfile_contents.should include("gem 'sinatra', '1.4.2'")
end
end
9 changes: 9 additions & 0 deletions spec/spec_helper.rb
@@ -0,0 +1,9 @@
require 'rubygems'
require 'bundler/setup'

require 'gemrat' # and any other gems you need
require 'pry'

RSpec.configure do |config|
# some (optional) config here
end

0 comments on commit 9dc4df2

Please sign in to comment.