I am writing user acceptance tests. The app consists of mock users using factory_girl, which I have not yet implemented. But at this point, poltergeist/turnip/rspec work fine, but I don't like the directory structure and I feel like I am not using turnip correctly as my steps and specs are separate files but share a lot of functionality.
I have this structure:
Gemfile
Gemfile.lock
spec/
│
├── acceptance
│ ├── homepage.feature
│ ├── chat.feature
│ │
│ │── steps
│ ├── homepage_steps.rb
│ ├── chat_steps.rb
│
├── chat_spec.rb
├── spec_helper.rb
└── support
├── capybara_helper.rb
├── helpers.rb
├── poltergeist_helper.rb
└── turnip_helper.rb
steps/chat_steps.rb contains
steps_for :group_chat
step "..." do
end
end
while spec/acceptance/chat.feature contains
@group_chat
Scenario: ...
Given ...
And ...
Then ...
What about chat_spec.rb? should this and the chat_steps.rb files be integrated together?
Is the convention to use spec/acceptance or step/features?