Just an update and a request, if anyone might be able to help.
The patch works and merges fine, but @eviltrout wanted me to add a controller spec that checks for class_name in the record being viewed, and assigns the embeddable_css_class variable for embedding in the template.
I am not having any luck getting it to work despite a great pointer to exactly where I should be looking:
I have modified spec/controllers/embed_controller_spec.rb down in the context "with multiple hosts" so the last call to Fabricator should include a class_name:
...
Fabricate(:embeddable_host, host: 'https://example.com', class_name: 'example')
Following @eviltrout’s guidance, I then added a new test to check, but this is not working. ![]()
it "contains custom class name" do
controller.request.stubs(:referer).returns("https://example.com/some-other-path")
get :comments, embed_url: embed_url
expect(assigns(:embeddable_css_class)).to eq('example')
end
I’m apologize if I’m a little dense, but I could really use a hand here figuring out how to get this last bit working.