Logo: Relish

  1. Sign in

Project: Piano-spec

`piano` command

The piano command

The piano command starts a Sinatra HTTP Server.

Scenarios
  • @piano
Called on an empty folder with no arguments
Given
the "arena" folder is an empty folder
When
the piano command is called
And
I go to "http://localhost:4567/"
Then
it should fail with 404
And
I should see "arena/index.haml"
  • @piano
There is only index.haml
Given
the "arena" folder has an "index.haml" with:
!!! 5
%html
  %head
    %title Play the Piano!
When
the piano command is called
And
I go to "http://localhost:4567/"
Then
I should see "Play the Piano!"
  • @piano
Change port to 4566
Given
the "arena" folder has an "index.haml" with:
!!! 5
%html
  %head
    %title Port is 4566
When
the piano 4566 command is called
And
I go to "http://localhost:4566/"
Then
I should see "Port is 4566"
  • @piano
  • @pianofile
There is Pianofile
Given
the "arena" folder has a "Pianofile" with:
get "/" do
  "From Pianofile"
end
When
the piano command is called
And
I go to "http://localhost:4567/"
Then
I should see "From Pianofile"

Last published over 7 years ago by xaviervia.