Skip to content

Instantly share code, notes, and snippets.

@tubbo

tubbo/test.rb Secret

Created April 20, 2015 14:21
Show Gist options
  • Save tubbo/e81dc8cd71c788b37a2a to your computer and use it in GitHub Desktop.
Save tubbo/e81dc8cd71c788b37a2a to your computer and use it in GitHub Desktop.
describe '#customization_options' do
before { class FooBar; end }
it 'returns a placeholder when there are no customizations' do
customizations = view_model.customization_options
expect(customizations).to eq([['None', nil]])
end
it 'returns array of customization options' do
allow(Weblinc.config).to receive(:customization_types).and_return([FooBar])
customizations = view_model.customization_options
expect(customizations).to eq([['None', nil], ['Foo Bar', 'weblinc/admin/foo_bar']])
end
after { Object.send(:remove_const, :FooBar) }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment