first mini test, remove spec
This commit is contained in:
parent
1526656dfe
commit
93ac945dd2
5
Gemfile
5
Gemfile
@ -9,3 +9,8 @@ gem "salama" , path: "../salama"
|
||||
gem "salama-reader" , path: "../salama-reader"
|
||||
gem "salama-arm" , path: "../salama-arm"
|
||||
gem "salama-object-file" , path: "../salama-object-file"
|
||||
|
||||
group :development do
|
||||
gem "minitest"
|
||||
gem "rubygems-tasks"
|
||||
end
|
||||
|
@ -37,6 +37,7 @@ GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
hike (1.2.3)
|
||||
minitest (5.7.0)
|
||||
opal (0.8.0)
|
||||
hike (~> 1.2)
|
||||
sourcemap (~> 0.1.0)
|
||||
@ -48,6 +49,7 @@ GEM
|
||||
opal (>= 0.7.0, < 0.9.0)
|
||||
rack (1.6.4)
|
||||
react-source (0.13.3)
|
||||
rubygems-tasks (0.2.4)
|
||||
sourcemap (0.1.1)
|
||||
sprockets (3.2.0)
|
||||
rack (~> 1.0)
|
||||
@ -57,10 +59,12 @@ PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
minitest
|
||||
opal-jquery
|
||||
opal-react!
|
||||
parslet!
|
||||
react-source
|
||||
rubygems-tasks
|
||||
salama!
|
||||
salama-arm!
|
||||
salama-object-file!
|
||||
|
@ -1,5 +0,0 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'sample http controller test', type: :http_controller do
|
||||
# Specs here
|
||||
end
|
@ -1,11 +0,0 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'sample integration test', type: :feature do
|
||||
# An example integration spec, this will only be run if ENV['BROWSER'] is
|
||||
# specified. Current values for ENV['BROWSER'] are 'firefox' and 'phantom'
|
||||
it 'should load the page' do
|
||||
visit '/'
|
||||
|
||||
expect(page).to have_content('Home')
|
||||
end
|
||||
end
|
@ -1,5 +0,0 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'sample model' do
|
||||
# Specs here
|
||||
end
|
@ -1,5 +0,0 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'sample task', type: :task do
|
||||
# Specs here
|
||||
end
|
@ -1,14 +0,0 @@
|
||||
# Volt sets up rspec and capybara for testing.
|
||||
require 'volt/spec/setup'
|
||||
Volt.spec_setup
|
||||
|
||||
RSpec.configure do |config|
|
||||
config.run_all_when_everything_filtered = true
|
||||
config.filter_run :focus
|
||||
|
||||
# Run specs in random order to surface order dependencies. If you find an
|
||||
# order dependency and want to debug it, you can fix the order by providing
|
||||
# the seed, which is printed after each run.
|
||||
# --seed 1234
|
||||
config.order = 'random'
|
||||
end
|
21
test/helper.rb
Normal file
21
test/helper.rb
Normal file
@ -0,0 +1,21 @@
|
||||
require 'rubygems'
|
||||
require 'bundler'
|
||||
begin
|
||||
Bundler.setup(:default, :development)
|
||||
rescue Bundler::BundlerError => e
|
||||
$stderr.puts e.message
|
||||
$stderr.puts "Run `bundle install` to install missing gems"
|
||||
exit e.status_code
|
||||
end
|
||||
if ENV['CODECLIMATE_REPO_TOKEN']
|
||||
require "codeclimate-test-reporter"
|
||||
CodeClimate::TestReporter.start
|
||||
end
|
||||
|
||||
require "minitest/autorun"
|
||||
|
||||
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
||||
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'test'))
|
||||
|
||||
require "salama"
|
||||
require "interpreter"
|
17
test/interpreter_test.rb
Normal file
17
test/interpreter_test.rb
Normal file
@ -0,0 +1,17 @@
|
||||
require_relative "helper"
|
||||
|
||||
class InterpreterTest < MiniTest::Test
|
||||
|
||||
def setup
|
||||
Virtual.machine.boot
|
||||
code = Ast::ExpressionList.new( [Ast::CallSiteExpression.new(:putstring, [] ,Ast::StringExpression.new("Hello again"))])
|
||||
Virtual::Compiler.compile( code , Virtual.machine.space.get_main )
|
||||
Virtual.machine.run_before "Register::CallImplementation"
|
||||
@interpreter = Interpreter.new
|
||||
@interpreter.start Virtual.machine.init
|
||||
end
|
||||
|
||||
def test_first
|
||||
@interpreter.tick
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user