Commit 9a0073c7 authored by Sean Arnold's avatar Sean Arnold

Tweak expectation for pill spec

parent b0765016
......@@ -167,10 +167,12 @@ RSpec.describe TodosHelper do
describe '#todo_target_state_pill' do
subject { helper.todo_target_state_pill(todo) }
shared_examples 'a rendered state pill' do |atrr|
shared_examples 'a rendered state pill' do |attr|
it 'returns expected html' do
html = "<span class=\"target-status\"><span class=\"status-box status-box-#{atrr[:type]}-#{atrr[:state].dasherize}\">#{atrr[:state].capitalize}</span></span>"
expect(subject).to eql(html)
aggregate_failures do
expect(subject).to have_css(".status-box-#{attr[:type]}-#{attr[:state].dasherize}")
expect(subject).to have_content(attr[:state].capitalize)
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment