Sha256: 6763e44f2ace3b3af9cb89495e0819dd9144d392c2873f2548a51590c5bdea53
Contents?: true
Size: 1.16 KB
Versions: 3
Compression:
Stored size: 1.16 KB
Contents
require 'rails_helper' require 'byebug' RSpec.describe KepplerFrontend::Views::Output, type: :services do context 'Output html format' do before(:each) do @view = create(:keppler_frontend_views, method: "GET") @view.install @code = KepplerFrontend::Views::Output.new(@view) end context 'code outputs' do it { expect(@code.html).to eq(" <h1> test_index template </h1>\n") } it { expect(@code.scss).to eq("/* Keppler - test_index.scss file */\n") } it { expect(@code.js).to eq("// Keppler - test_index.js file\n$(document).ready(function(){\n // Use jquery functions here\n});\n") } it { expect(@code.action).to eq("# Insert ruby code...\n") } end after(:each) do @view.uninstall end end context 'Output remote format' do before(:each) do @view = create(:keppler_frontend_views, method: "GET", format_result: "JS") @view.install @code = KepplerFrontend::Views::Output.new(@view) end context 'code outputs' do it { expect(@code.remote_js).to eq("// test_index javascript Erb template\n") } end after(:each) do @view.uninstall end end end
Version data entries
3 entries across 3 versions & 1 rubygems