Created
August 6, 2020 08:38
-
-
Save tadas-s/2f9a6918ac614b75d80f2f79960e845f to your computer and use it in GitHub Desktop.
An example of bundler's inline feature used with rspec
This file contains hidden or 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
begin | |
require 'bundler/inline' | |
rescue LoadError => e | |
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
raise e | |
end | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'rspec' | |
end | |
require 'rspec/autorun' | |
class HelloWorld | |
def say_hello | |
'Hello World!' | |
end | |
end | |
describe HelloWorld do | |
it 'says hello' do | |
expect(subject.say_hello).to eq 'Hello World!' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output of this in use: