Consider the following spec which as intermittently failing the should update savings spec.
# spec/integration/drafts/pro/finishing_spec.rb
require 'spec_helper'
describe 'finishing', js: true do| class Todo < ApplicationRecord | |
| end |
| class TodoIndex < HyperComponent | |
| def create_new_todo_item | |
| Todo.create(title: @title) | |
| @title = nil | |
| end | |
| render(DIV, class: 'ToDo') do | |
| IMG(class: 'Logo', src: 'assets/logo.png', alt: 'Hyperstack Logo') | |
| H1(class: 'ToDo-Header') { 'Hyperstack To Do' } |
| class TodoIndex < HyperComponent | |
| # TodoIndex is the conventional name for listing | |
| # a set of items. | |
| INITIAL_TODOS = [ | |
| { | |
| todo: 'clean the house' | |
| }, | |
| { | |
| todo: 'buy milk' | |
| } |
| import React, {Component} from 'react'; | |
| import './ToDo.css'; | |
| import ToDoItem from './components/ToDoItem'; | |
| import Logo from './assets/logo.png'; | |
| class ToDo extends Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| // this is where the data goes |
| class TodoItem < HyperComponent | |
| param :item | |
| fires :delete_item | |
| render(DIV, class: 'ToDoItem') do | |
| P(class: 'ToDoItem-Text') { @Item } | |
| BUTTON(class: 'ToDoItem-Delete').on(:click) { delete_item! } | |
| end | |
| end |
| import React, {Component} from 'react'; | |
| import './ToDoItem.css'; | |
| class ToDoItem extends Component { | |
| render() { | |
| return ( | |
| <div className="ToDoItem"> | |
| <p className="ToDoItem-Text">{this.props.item}</p> | |
| <button className="ToDoItem-Delete" |
| class Node | |
| # each node has a val (value) and a link to the next node. | |
| def val # reads the instance variable val | |
| @val | |
| end | |
| def next_node # reads the instance variable next_node | |
| @next_node |
| class Something | |
| def self.display_map | |
| [ | |
| { | |
| key: :position, | |
| name: 'Number' | |
| }, | |
| { | |
| key: :design_collection, | |
| name: 'Collection', |
| # app/hyperloop/operations/controller_op.rb | |
| # make sure to also require 'operations/controller_op' | |
| # at the *END* of config/initializers/hyperloop.rb | |
| module Hyperloop | |
| # monkey patch HyperloopController to pass controller instance from controller method to ServerOp | |
| Engine.routes.append do |