summaryrefslogtreecommitdiff
path: root/spec/javascripts/fixtures/emojis.rb
blob: 4dab697e5e2dcf1f8683e910486cebe940932b68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'spec_helper'

describe 'Emojis (JavaScript fixtures)' do
  include JavaScriptFixturesHelpers

  before(:all) do
    clean_frontend_fixtures('emojis/')
  end

  it 'emojis/emojis.json' do |example|
    JavaScriptFixturesHelpers::FIXTURE_PATHS.each do |fixture_path|
      next unless File.directory?(fixture_path)

      # Copying the emojis.json from the public folder
      fixture_file_name = File.expand_path('emojis/emojis.json', fixture_path)
      FileUtils.mkdir_p(File.dirname(fixture_file_name))
      FileUtils.cp(Rails.root.join('public/-/emojis/1/emojis.json'), fixture_file_name)
    end
  end
end