mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-16 06:51:27 +00:00
Setup environment to work in Docker container
Fixes AlexUkPC/GildedRose-Refactoring-Kata#1
This commit is contained in:
parent
878f2da3aa
commit
ce3f7128b2
9
Dockerfile
Normal file
9
Dockerfile
Normal file
@ -0,0 +1,9 @@
|
||||
FROM ruby:2.7
|
||||
# define the environment variable install path
|
||||
ENV INSTALL_PATH /opt/app/
|
||||
# copy files from ruby folder into the container
|
||||
COPY ruby/ $INSTALL_PATH
|
||||
# install RSpec
|
||||
RUN gem install rspec
|
||||
# set the working directory
|
||||
WORKDIR $INSTALL_PATH
|
||||
@ -1,3 +1,11 @@
|
||||
## Commands to run for docker ruby environment
|
||||
|
||||
### Create the image
|
||||
> docker build -t gilded-rose-app .
|
||||
### Run the RSpec tests
|
||||
> docker run -it --rm -v ${PWD}/ruby:/opt/app gilded-rose-app rspec .
|
||||
### Run the unit tests
|
||||
> docker run -it --rm -v ${PWD}/ruby:/opt/app gilded-rose-app ruby gilded_rose_tests.rb
|
||||
# Gilded Rose Refactoring Kata
|
||||
|
||||
This Kata was originally created by Terry Hughes (http://twitter.com/TerryHughes). It is already on GitHub [here](https://github.com/NotMyself/GildedRose). See also [Bobby Johnson's description of the kata](http://iamnotmyself.com/2011/02/13/refactor-this-the-gilded-rose-kata/).
|
||||
|
||||
@ -6,7 +6,7 @@ describe GildedRose do
|
||||
it "does not change the name" do
|
||||
items = [Item.new("foo", 0, 0)]
|
||||
GildedRose.new(items).update_quality()
|
||||
expect(items[0].name).to eq "fixme"
|
||||
expect(items[0].name).to eq "foo"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ class TestUntitled < Test::Unit::TestCase
|
||||
def test_foo
|
||||
items = [Item.new("foo", 0, 0)]
|
||||
GildedRose.new(items).update_quality()
|
||||
assert_equal items[0].name, "fixme"
|
||||
assert_equal items[0].name, "foo"
|
||||
end
|
||||
|
||||
end
|
||||
Loading…
Reference in New Issue
Block a user